Defines a STOMP server. STOMP servers delegates to a @see \io\vertx\jphp\ext\stomp\StompServerHandler that let customize the behavior of the server. By default, it uses a handler compliant with the STOMP specification, but let you change anything.
| package |
Default |
|---|
__construct()
actualPort() : integer
This is useful if you bound the server specifying 0 as port number signifying an ephemeral port.
integerthe port
close( $arg0 = null) : void
close()
Closes the server.
param $completionHandler [callable] handler called once the server has been stopped close($completionHandler)
callable
create( $arg0, $arg1 = null, $arg2 = null) : \io\vertx\jphp\ext\stomp\StompServer
param $vertx [Vertx] the vert.x instance to use create($vertx)
Creates a @see \io\vertx\jphp\ext\stomp\StompServer based on the default Stomp Server implementation.
param $vertx [Vertx] the vert.x instance to use param $options [StompServerOptions | array] the server options create($vertx, $options)
Creates a @see \io\vertx\jphp\ext\stomp\StompServer based on the default Stomp Server implementation.
param $vertx [Vertx] the vert.x instance to use param $netServer [NetServer] the Net server used by the STOMP server create($vertx, $netServer)
Creates a @see \io\vertx\jphp\ext\stomp\StompServer based on the default Stomp Server implementation.
param $vertx [Vertx] the vert.x instance to use param $net [NetServer] the Net server used by the STOMP server param $options [StompServerOptions | array] the server options create($vertx, $net, $options)
Vertx
array | StompServerOptions | NetServer
array | StompServerOptions
\io\vertx\jphp\ext\stomp\StompServerthe created {@link StompServer}
handler( $arg0) : $this
StompServerHandler
$thisthe current {@link StompServer}
isListening() : boolean
boolean{@code true} if the server is listening, {@code false} otherwise
listen( $arg0 = null, $arg1 = null, $arg2 = null) : $this
listen()
Connects the STOMP server to the given port.
param $port [integer] the port listen($port)
Connects the STOMP server default port (61613) and network interface (0.0.0.0). Once the socket
it bounds calls the given handler with the result. The result may be a failure if the socket is already used.
param $handler [callable] the handler to call with the result listen($handler)
Connects the STOMP server to the given port / interface.
param $port [integer] the port param $host [string] the interface listen($port, $host)
Connects the STOMP server to the given port. This method use the default host (0.0.0.0). Once the socket
it bounds calls the given handler with the result. The result may be a failure if the socket is already used.
param $port [integer] the port param $handler [callable] the handler to call with the result listen($port, $handler)
Connects the STOMP server to the given port / interface. Once the socket it bounds calls the given handler with the result. The result may be a failure if the socket is already used.
param $port [integer] the port param $host [string] the host / interface param $handler [callable] the handler to call with the result listen($port, $host, $handler)
callable | integer
callable | string
callable
$thisthe current {@link StompServer}
stompHandler() : \io\vertx\jphp\ext\stomp\StompServerHandler
\io\vertx\jphp\ext\stomp\StompServerHandlerthe {@link StompServerHandler} used by this server.
vertx() : \io\vertx\jphp\core\Vertx
webSocketHandler() : callable
callablethe handler that can be passed to {@link io.vertx.core.http.HttpServer#websocketHandler(Handler)}.
writingFrameHandler( $arg0) : $this
callable
$thisthe current {@link StompServer}