interface StompServer
Defines a STOMP server. STOMP servers delegates to a 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.
Author
Clement Escoffier
abstract fun actualPort(): Int
Gets the port on which the server is listening. This is useful if you bound the server specifying 0 as port number signifying an ephemeral port. |
|
abstract fun close(completionHandler: Handler<AsyncResult<Void>>): Unitabstract fun close(): Unit
Closes the server. |
|
open static fun create(vertx: Vertx, options: StompServerOptions): StompServeropen static fun create(vertx: Vertx, netServer: NetServer): StompServeropen static fun create(vertx: Vertx, net: NetServer, options: StompServerOptions): StompServer
Creates a StompServer based on the default Stomp Server implementation. open static fun create(vertx: Vertx): StompServer
Creates a StompServer based on the default Stomp Server implementation, and use the default options. |
|
abstract fun handler(handler: StompServerHandler): StompServer
Configures the StompServerHandler. You must calls this method before calling the |
|
abstract fun isListening(): Boolean
Checks whether or not the server is listening. |
|
abstract fun listen(port: Int): StompServer
Connects the STOMP server to the given port. abstract fun listen(port: Int, host: String): StompServer
Connects the STOMP server to the given port / interface. abstract fun listen(): StompServer
Connects the STOMP server to the port / host configured in the server options. abstract fun listen(handler: Handler<AsyncResult<StompServer>>): StompServer
Connects the STOMP server default port (61613) and network interface ( abstract fun listen(port: Int, handler: Handler<AsyncResult<StompServer>>): StompServer
Connects the STOMP server to the given port. This method use the default host ( abstract fun listen(port: Int, host: String, handler: Handler<AsyncResult<StompServer>>): StompServer
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. |
|
abstract fun options(): StompServerOptions |
|
abstract fun stompHandler(): StompServerHandler |
|
abstract fun vertx(): Vertx |
|
abstract fun webSocketHandler(): Handler<ServerWebSocket>
Gets the Handler able to manage web socket connections. If the web socket bridge is disabled, it returns |
|
abstract fun writingFrameHandler(handler: Handler<ServerFrame>): StompServer
Configures the handler that is invoked every time a frame is going to be written to the "wire". It lets you log the frames, but also adapt the frame if needed. |