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 io.vertx.lang.rx.TypeArg<StompServer> |
__TYPE_ARG |
Constructor and Description |
---|
StompServer(Object delegate) |
StompServer(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,
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. |
boolean |
equals(Object o) |
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(StompServer arg) |
StompServerOptions |
options() |
Single<Void> |
rxClose()
Closes the server.
|
Single<StompServer> |
rxListen()
Connects the STOMP server default port (61613) and network interface (
0.0.0.0 ). |
Single<StompServer> |
rxListen(int port)
Connects the STOMP server to the given port.
|
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 io.vertx.lang.rx.TypeArg<StompServer> __TYPE_ARG
public StompServer(StompServer delegate)
public StompServer(Object delegate)
public StompServer getDelegate()
public static StompServer create(Vertx vertx, StompServerOptions options)
StompServer
based on the default Stomp Server implementation.vertx
- the vert.x instance to useoptions
- the server optionsStompServer
public 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 serverStompServer
public static 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 optionsStompServer
public static StompServer create(Vertx vertx)
StompServer
based on the default Stomp Server implementation, and use the default options.vertx
- the vert.x instance to useStompServer
public 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 handlerStompServer
public 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 resultStompServer
public 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.StompServer
public 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.StompServer
public 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 resultStompServer
public 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 portStompServer
public 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 portStompServer
public StompServer listen(int port, String host, Handler<AsyncResult<StompServer>> handler)
port
- the porthost
- the host / interfacehandler
- the handler to call with the resultStompServer
public StompServer listen(int port, String host)
port
- the porthost
- the host / interfaceStompServer
public Single<StompServer> rxListen(int port, String host)
port
- the porthost
- the host / interfaceStompServer
public void close(Handler<AsyncResult<Void>> completionHandler)
completionHandler
- handler called once the server has been stoppedpublic void close()
public boolean isListening()
true
if the server is listening, false
otherwisepublic int actualPort()
public 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 null
StompServer
public static StompServer newInstance(StompServer arg)
Copyright © 2021 Eclipse. All rights reserved.