public class StompServer extends Object
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.
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.| Modifier and Type | Field and Description |
|---|---|
static TypeArg<StompServer> |
__TYPE_ARG |
| Constructor and Description |
|---|
StompServer(Object delegate) |
StompServer(io.vertx.ext.stomp.StompServer delegate) |
| 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,
io.vertx.ext.stomp.StompServerOptions options)
Creates a
StompServer based on the default Stomp Server implementation. |
static StompServer |
create(Vertx vertx,
io.vertx.ext.stomp.StompServerOptions options)
Creates a
StompServer based on the default Stomp Server implementation. |
boolean |
equals(Object o) |
io.vertx.ext.stomp.StompServer |
getDelegate() |
StompServer |
handler(StompServerHandler handler)
Configures the
StompServerHandler. |
int |
hashCode() |
boolean |
isListening()
Checks whether or not the server is listening.
|
StompServer |
listen()
Connects the STOMP server default port (61613) and network interface (
0.0.0.0). |
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.
|
static StompServer |
newInstance(io.vertx.ext.stomp.StompServer arg) |
io.vertx.ext.stomp.StompServerOptions |
options() |
rx.Single<Void> |
rxClose()
Closes the server.
|
rx.Single<StompServer> |
rxListen()
Connects the STOMP server default port (61613) and network interface (
0.0.0.0). |
rx.Single<StompServer> |
rxListen(int port)
Connects the STOMP server to the given port.
|
rx.Single<StompServer> |
rxListen(int port,
String host)
Connects the STOMP server to the given port / interface.
|
StompServerHandler |
stompHandler() |
String |
toString() |
Vertx |
vertx() |
Handler<ServerWebSocket> |
webSocketHandler()
Gets the able to manage web socket connections.
|
StompServer |
writingFrameHandler(Handler<ServerFrame> handler)
Configures the handler that is invoked every time a frame is going to be written to the "wire".
|
public static final TypeArg<StompServer> __TYPE_ARG
public StompServer(io.vertx.ext.stomp.StompServer delegate)
public StompServer(Object delegate)
public io.vertx.ext.stomp.StompServer getDelegate()
public static StompServer create(Vertx vertx, io.vertx.ext.stomp.StompServerOptions options)
StompServer based on the default Stomp Server implementation.vertx - the vert.x instance to useoptions - the server optionsStompServerpublic static 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 serverStompServerpublic static StompServer create(Vertx vertx, NetServer net, io.vertx.ext.stomp.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 optionsStompServerpublic static StompServer create(Vertx vertx)
StompServer based on the default Stomp Server implementation, and use the default options.vertx - the vert.x instance to useStompServerpublic StompServer handler(StompServerHandler handler)
StompServerHandler. You must calls this method before calling the listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.rxjava.ext.stomp.StompServer>>) method.handler - the handlerStompServerpublic StompServer 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 resultStompServerpublic StompServer listen()
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.StompServerpublic rx.Single<StompServer> rxListen()
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.StompServerpublic StompServer 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 resultStompServerpublic StompServer listen(int port)
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 portStompServerpublic rx.Single<StompServer> rxListen(int port)
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 portStompServerpublic StompServer listen(int port, String host, Handler<AsyncResult<StompServer>> handler)
port - the porthost - the host / interfacehandler - the handler to call with the resultStompServerpublic StompServer listen(int port, String host)
port - the porthost - the host / interfaceStompServerpublic rx.Single<StompServer> rxListen(int port, String host)
port - the porthost - the host / interfaceStompServerpublic void close(Handler<AsyncResult<Void>> completionHandler)
completionHandler - handler called once the server has been stoppedpublic void close()
public rx.Single<Void> rxClose()
public boolean isListening()
true if the server is listening, false otherwisepublic int actualPort()
public io.vertx.ext.stomp.StompServerOptions options()
public Vertx vertx()
public StompServerHandler stompHandler()
StompServerHandler used by this server.public Handler<ServerWebSocket> webSocketHandler()
null.HttpServer.webSocketHandler(io.vertx.core.Handler<io.vertx.rxjava.core.http.ServerWebSocket>).public StompServer writingFrameHandler(Handler<ServerFrame> handler)
handler - the handler, must not be nullStompServerpublic static StompServer newInstance(io.vertx.ext.stomp.StompServer arg)
Copyright © 2021. All rights reserved.