public interface StompServer
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.| Modifier and Type | Method and Description |
|---|---|
int |
actualPort()
Gets the port on which the server is listening.
|
void |
close()
Closes the server.
|
void |
close(Handler<AsyncResult<Void>> completionHandler)
Closes the server.
|
static StompServer |
create(Vertx vertx)
Creates a
StompServer based on the default Stomp Server implementation, and use the default options. |
static StompServer |
create(Vertx vertx,
NetServer netServer)
Creates a
StompServer based on the default Stomp Server implementation. |
static StompServer |
create(Vertx vertx,
NetServer net,
StompServerOptions options)
Creates a
StompServer based on the default Stomp Server implementation. |
static StompServer |
create(Vertx vertx,
StompServerOptions options)
Creates a
StompServer based on the default Stomp Server implementation. |
StompServer |
handler(StompServerHandler handler)
Configures the
StompServerHandler. |
boolean |
isListening()
Checks whether or not the server is listening.
|
StompServer |
listen()
Connects the STOMP server to the port / host configured in the server options.
|
StompServer |
listen(Handler<AsyncResult<StompServer>> handler)
Connects the STOMP server default port (61613) and network interface (
0.0.0.0). |
StompServer |
listen(int port)
Connects the STOMP server to the given port.
|
StompServer |
listen(int port,
Handler<AsyncResult<StompServer>> handler)
Connects the STOMP server to the given port.
|
StompServer |
listen(int port,
String host)
Connects the STOMP server to the given port / interface.
|
StompServer |
listen(int port,
String host,
Handler<AsyncResult<StompServer>> handler)
Connects the STOMP server to the given port / interface.
|
StompServerOptions |
options() |
StompServerHandler |
stompHandler() |
Vertx |
vertx() |
static StompServer create(Vertx vertx, StompServerOptions options)
StompServer based on the default Stomp Server implementation.vertx - the vert.x instance to useoptions - the server optionsStompServerstatic StompServer create(Vertx vertx, NetServer netServer)
StompServer based on the default Stomp Server implementation.vertx - the vert.x instance to usenetServer - the Net server used by the STOMP serverStompServerstatic StompServer create(Vertx vertx, NetServer net, StompServerOptions options)
StompServer based on the default Stomp Server implementation.vertx - the vert.x instance to usenet - the Net server used by the STOMP serveroptions - the server optionsStompServerstatic StompServer create(Vertx vertx)
StompServer based on the default Stomp Server implementation, and use the default options.vertx - the vert.x instance to useStompServerStompServer handler(StompServerHandler handler)
StompServerHandler. You must calls this method before calling the listen() method.handler - the handlerStompServerStompServer listen(int port)
port - the portStompServerStompServer listen(int port, String host)
port - the porthost - the interfaceStompServerStompServer listen()
StompServerStompServer listen(Handler<AsyncResult<StompServer>> handler)
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.handler - the handler to call with the resultStompServerStompServer listen(int port, Handler<AsyncResult<StompServer>> handler)
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.port - the porthandler - the handler to call with the resultStompServerStompServer listen(int port, String host, Handler<AsyncResult<StompServer>> handler)
port - the porthost - the host / interfacehandler - the handler to call with the resultStompServervoid close(Handler<AsyncResult<Void>> completionHandler)
completionHandler - handler called once the server has been stoppedvoid close()
boolean isListening()
true if the server is listening, false otherwiseint actualPort()
NetServer.actualPort()StompServerOptions options()
Vertx vertx()
StompServerHandler stompHandler()
StompServerHandler used by this server.Copyright © 2015. All rights reserved.