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.
|
io.vertx.core.Future<Void> |
close()
Closes the server.
|
void |
close(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> completionHandler)
Closes the server.
|
static StompServer |
create(io.vertx.core.Vertx vertx)
Creates a
StompServer based on the default Stomp Server implementation, and use the default options. |
static StompServer |
create(io.vertx.core.Vertx vertx,
io.vertx.core.net.NetServer netServer)
Creates a
StompServer based on the default Stomp Server implementation. |
static StompServer |
create(io.vertx.core.Vertx vertx,
io.vertx.core.net.NetServer net,
StompServerOptions options)
Creates a
StompServer based on the default Stomp Server implementation. |
static StompServer |
create(io.vertx.core.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.
|
io.vertx.core.Future<StompServer> |
listen()
Connects the STOMP server to the port / host configured in the server options.
|
StompServer |
listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<StompServer>> handler)
Connects the STOMP server default port (61613) and network interface (
0.0.0.0). |
io.vertx.core.Future<StompServer> |
listen(int port)
Connects the STOMP server to the given port.
|
StompServer |
listen(int port,
io.vertx.core.Handler<io.vertx.core.AsyncResult<StompServer>> handler)
Connects the STOMP server to the given port.
|
io.vertx.core.Future<StompServer> |
listen(int port,
String host)
Connects the STOMP server to the given port / interface.
|
StompServer |
listen(int port,
String host,
io.vertx.core.Handler<io.vertx.core.AsyncResult<StompServer>> handler)
Connects the STOMP server to the given port / interface.
|
StompServerOptions |
options() |
StompServerHandler |
stompHandler() |
io.vertx.core.Vertx |
vertx() |
io.vertx.core.Handler<io.vertx.core.http.ServerWebSocket> |
webSocketHandler()
Gets the
Handler able to manage web socket connections. |
StompServer |
writingFrameHandler(io.vertx.core.Handler<ServerFrame> handler)
Configures the handler that is invoked every time a frame is going to be written to the "wire".
|
static StompServer create(io.vertx.core.Vertx vertx, StompServerOptions options)
StompServer based on the default Stomp Server implementation.vertx - the vert.x instance to useoptions - the server optionsStompServerstatic StompServer create(io.vertx.core.Vertx vertx, io.vertx.core.net.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(io.vertx.core.Vertx vertx, io.vertx.core.net.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(io.vertx.core.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 handlerStompServerio.vertx.core.Future<StompServer> listen(int port)
port - the portio.vertx.core.Future<StompServer> listen(int port, String host)
port - the porthost - the interfaceio.vertx.core.Future<StompServer> listen()
StompServer listen(io.vertx.core.Handler<io.vertx.core.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, io.vertx.core.Handler<io.vertx.core.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, io.vertx.core.Handler<io.vertx.core.AsyncResult<StompServer>> handler)
port - the porthost - the host / interfacehandler - the handler to call with the resultStompServervoid close(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> completionHandler)
completionHandler - handler called once the server has been stoppedio.vertx.core.Future<Void> close()
boolean isListening()
true if the server is listening, false otherwiseint actualPort()
NetServer.actualPort()StompServerOptions options()
io.vertx.core.Vertx vertx()
StompServerHandler stompHandler()
StompServerHandler used by this server.io.vertx.core.Handler<io.vertx.core.http.ServerWebSocket> webSocketHandler()
Handler able to manage web socket connections. If the web socket bridge is disabled, it returns
null.HttpServer.webSocketHandler(Handler).StompServer writingFrameHandler(io.vertx.core.Handler<ServerFrame> handler)
handler - the handler, must not be nullStompServerCopyright © 2020 Eclipse. All rights reserved.