Class StompServer
java.lang.Object
io.vertx.rxjava3.ext.stomp.StompServer
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
Defines a STOMP server. STOMP servers delegates to a
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGets the port on which the server is listening.close()Closes the server.static StompServerCreates aStompServerbased on the default Stomp Server implementation, and use the default options.static StompServercreate(Vertx vertx, StompServerOptions options) Creates aStompServerbased on the default Stomp Server implementation.static StompServerCreates aStompServerbased on the default Stomp Server implementation.static StompServercreate(Vertx vertx, NetServer net, StompServerOptions options) Creates aStompServerbased on the default Stomp Server implementation.booleanhandler(StompServerHandler handler) Configures theStompServerHandler.inthashCode()booleanChecks whether or not the server is listening.listen()Connects the STOMP server default port (61613) and network interface (0.0.0.0).listen(int port) Connects the STOMP server to the given port.Connects the STOMP server to the given port / interface.static StompServernewInstance(StompServer arg) options()rxClose()Closes the server.rxListen()Connects the STOMP server default port (61613) and network interface (0.0.0.0).rxListen(int port) Connects the STOMP server to the given port.Connects the STOMP server to the given port / interface.toString()vertx()Gets the able to manage web socket connections.Gets the able to manage web socket connection handshakes.writingFrameHandler(Handler<ServerFrame> handler) Configures the handler that is invoked every time a frame is going to be written to the "wire".
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
StompServer
-
StompServer
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
create
Creates aStompServerbased on the default Stomp Server implementation.- Parameters:
vertx- the vert.x instance to useoptions- the server options- Returns:
- the created
StompServer
-
create
Creates aStompServerbased on the default Stomp Server implementation.- Parameters:
vertx- the vert.x instance to usenetServer- the Net server used by the STOMP server- Returns:
- the created
StompServer
-
create
Creates aStompServerbased on the default Stomp Server implementation.- Parameters:
vertx- the vert.x instance to usenet- the Net server used by the STOMP serveroptions- the server options- Returns:
- the created
StompServer
-
create
Creates aStompServerbased on the default Stomp Server implementation, and use the default options.- Parameters:
vertx- the vert.x instance to use- Returns:
- the created
StompServer
-
handler
Configures theStompServerHandler. You must calls this method before calling thelisten(int)method.- Parameters:
handler- the handler- Returns:
- the current
StompServer
-
listen
Connects the STOMP server to the given port. This method use the default host (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.- Parameters:
port- the port- Returns:
- a future resolved with the listen result
-
rxListen
Connects the STOMP server to the given port. This method use the default host (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.- Parameters:
port- the port- Returns:
- a future resolved with the listen result
-
listen
Connects the STOMP server to the given port / interface. Once the socket it bounds calls the given handler with the result. The result may be a failure if the socket is already used.- Parameters:
port- the porthost- the interface- Returns:
- a future resolved with the listen result
-
rxListen
Connects the STOMP server to the given port / interface. Once the socket it bounds calls the given handler with the result. The result may be a failure if the socket is already used.- Parameters:
port- the porthost- the interface- Returns:
- a future resolved with the listen result
-
listen
Connects the STOMP server default port (61613) and network interface (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.- Returns:
- a future resolved with the listen result
-
rxListen
Connects the STOMP server default port (61613) and network interface (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.- Returns:
- a future resolved with the listen result
-
close
-
rxClose
-
isListening
public boolean isListening()Checks whether or not the server is listening.- Returns:
trueif the server is listening,falseotherwise
-
actualPort
public int actualPort()Gets the port on which the server is listening. This is useful if you bound the server specifying 0 as port number signifying an ephemeral port.- Returns:
- the port
-
options
- Returns:
- the server options
-
vertx
- Returns:
- the instance of vert.x used by the server.
-
stompHandler
- Returns:
- the
StompServerHandlerused by this server.
-
webSocketHandshakeHandler
Gets the able to manage web socket connection handshakes. If the web socket bridge is disabled, it returnsnull.- Returns:
- the handler that can be passed to
HttpServer.webSocketHandshakeHandler(Handler).
-
webSocketHandler
Gets the able to manage web socket connections. If the web socket bridge is disabled, it returnsnull.- Returns:
- the handler that can be passed to
HttpServer.webSocketHandler(Handler).
-
writingFrameHandler
Configures the handler that is invoked every time a frame is going to be written to the "wire". It lets you log the frames, but also adapt the frame if needed.- Parameters:
handler- the handler, must not benull- Returns:
- the current
StompServer
-
newInstance
-