new StompServer()
- Source:
Methods
-
actualPort() → {number}
-
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.
- Source:
Returns:
the port- Type
- number
-
close(completionHandler)
-
Closes the server.
Parameters:
Name Type Description completionHandler
function handler called once the server has been stopped - Source:
-
handler(handler) → {StompServer}
-
Configures the StompServerHandler. You must calls this method before calling the StompServer#listen method.
Parameters:
Name Type Description handler
StompServerHandler the handler - Source:
Returns:
the current StompServer- Type
- StompServer
-
isListening() → {boolean}
-
Checks whether or not the server is listening.
- Source:
Returns:
true
if the server is listening,false
otherwise- Type
- boolean
-
listen(port, host, handler) → {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.
Parameters:
Name Type Description port
number the port host
string the host / interface handler
function the handler to call with the result - Source:
Returns:
the current StompServer- Type
- StompServer
-
options() → {Object}
-
- Source:
Returns:
-
the server options
-
- Type
- Object
-
stompHandler() → {StompServerHandler}
-
- Source:
Returns:
-
the StompServerHandler used by this server.
-
- Type
- StompServerHandler
-
vertx() → {Vertx}
-
- Source:
Returns:
-
the instance of vert.x used by the server.
-
- Type
- Vertx