Class StompServer
- All Implemented Interfaces:
MutinyDelegate
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 Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStompServer(io.vertx.ext.stomp.StompServer delegate) StompServer(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionintio.smallrye.mutiny.Uni<Void>close()Closes the server.Blocking variant ofclose().voidVariant ofclose()that ignores the result of the operation.static StompServerstatic StompServerstatic StompServerstatic StompServerbooleanio.vertx.ext.stomp.StompServerhandler(StompServerHandler handler) inthashCode()booleanio.smallrye.mutiny.Uni<StompServer>listen()Connects the STOMP server default port (61613) and network interface (0.0.0.0).io.smallrye.mutiny.Uni<StompServer>listen(int port) Connects the STOMP server to the given port.io.smallrye.mutiny.Uni<StompServer>Connects the STOMP server to the given port / interface.Blocking variant oflisten().listenAndAwait(int port) Blocking variant oflisten(int).listenAndAwait(int port, String host) Blocking variant oflisten(int,String).Variant oflisten()that ignores the result of the operation.listenAndForget(int port) Variant oflisten(int)that ignores the result of the operation.listenAndForget(int port, String host) Variant oflisten(int,String)that ignores the result of the operation.static StompServernewInstance(io.vertx.ext.stomp.StompServer arg) io.vertx.ext.stomp.StompServerOptionsoptions()toString()vertx()io.vertx.core.Handler<ServerWebSocket>writingFrameHandler(Consumer<ServerFrame> handler)
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
StompServer
public StompServer(io.vertx.ext.stomp.StompServer delegate) -
StompServer
-
-
Method Details
-
getDelegate
public io.vertx.ext.stomp.StompServer getDelegate()- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
create
- Parameters:
vertx- the vert.x instance to useoptions- the server options- Returns:
- the created
StompServer
-
create
- Parameters:
vertx- the vert.x instance to usenetServer- the Net server used by the STOMP server- Returns:
- the created
StompServer
-
create
public static StompServer create(Vertx vertx, NetServer net, io.vertx.ext.stomp.StompServerOptions options) - Parameters:
vertx- the vert.x instance to usenet- the Net server used by the STOMP serveroptions- the server options- Returns:
- the created
StompServer
-
create
- Parameters:
vertx- the vert.x instance to use- Returns:
- the created
StompServer
-
handler
- Parameters:
handler- the handler- Returns:
- the current
StompServer
-
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.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
listenAndAwait
Blocking variant oflisten().This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Returns:
- the StompServer instance produced by the operation.
-
listenAndForget
Variant oflisten()that ignores the result of the operation.This method subscribes on the result of
listen(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromlisten()but you don't need to compose it with other operations.- Returns:
- the instance of StompServer to chain method calls.
-
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.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
port- the port- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
listenAndAwait
Blocking variant oflisten(int).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
port- the port- Returns:
- the StompServer instance produced by the operation.
-
listenAndForget
Variant oflisten(int)that ignores the result of the operation.This method subscribes on the result of
listen(int), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromlisten(int)but you don't need to compose it with other operations.- Parameters:
port- the port- Returns:
- the instance of StompServer to chain method calls.
-
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.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
port- the porthost- the host / interface- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
listenAndAwait
Blocking variant oflisten(int,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
port- the porthost- the host / interface- Returns:
- the StompServer instance produced by the operation.
-
listenAndForget
Variant oflisten(int,String)that ignores the result of the operation.This method subscribes on the result of
listen(int,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromlisten(int,String)but you don't need to compose it with other operations.- Parameters:
port- the porthost- the host / interface- Returns:
- the instance of StompServer to chain method calls.
-
close
Closes the server.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
closeAndAwait
Blocking variant ofclose().This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Returns:
- the Void instance produced by the operation.
-
closeAndForget
public void closeAndForget() -
isListening
public boolean isListening()- Returns:
trueif the server is listening,falseotherwise
-
actualPort
public int actualPort()- Returns:
- the port
-
options
public io.vertx.ext.stomp.StompServerOptions options()- Returns:
- the server options
-
vertx
- Returns:
- the instance of vert.x used by the server.
-
stompHandler
- Returns:
- the
StompServerHandlerused by this server.
-
webSocketHandler
- Returns:
- the handler that can be passed to
HttpServer.webSocketHandler(java.util.function.Consumer<io.vertx.mutiny.core.http.ServerWebSocket>).
-
writingFrameHandler
- Parameters:
handler- the handler, must not benull- Returns:
-
newInstance
-