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.| Constructor and Description |
|---|
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.
|
rx.Observable<Void> |
closeObservable()
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. |
Object |
getDelegate() |
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.
|
rx.Observable<StompServer> |
listenObservable()
Connects the STOMP server default port (61613) and network interface (
0.0.0.0). |
rx.Observable<StompServer> |
listenObservable(int port)
Connects the STOMP server to the given port.
|
rx.Observable<StompServer> |
listenObservable(int port,
String host)
Connects the STOMP server to the given port / interface.
|
static StompServer |
newInstance(StompServer arg) |
StompServerOptions |
options() |
StompServerHandler |
stompHandler() |
Vertx |
vertx() |
public StompServer(StompServer delegate)
public Object 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 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, 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(int) method.handler - the handlerStompServerpublic StompServer listen(int port)
port - the portStompServerpublic StompServer listen(int port, String host)
port - the porthost - the interfaceStompServerpublic StompServer listen()
StompServerpublic 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 rx.Observable<StompServer> listenObservable()
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.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 resultStompServerpublic rx.Observable<StompServer> listenObservable(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 portpublic StompServer listen(int port, String host, Handler<AsyncResult<StompServer>> handler)
port - the porthost - the host / interfacehandler - the handler to call with the resultStompServerpublic rx.Observable<StompServer> listenObservable(int port, String host)
port - the porthost - the host / interfacepublic void close(Handler<AsyncResult<Void>> completionHandler)
completionHandler - handler called once the server has been stoppedpublic rx.Observable<Void> closeObservable()
public 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 static StompServer newInstance(StompServer arg)
Copyright © 2015. All rights reserved.