Class StompServerHandler
- All Implemented Interfaces:
MutinyDelegate
,io.vertx.core.Handler<ServerFrame>
,Consumer<ServerFrame>
NOTE: This class has been automatically generated from the original
non Mutiny-ified interface using Vert.x codegen.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStompServerHandler
(io.vertx.ext.stomp.StompServerHandler delegate) StompServerHandler
(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionabortHandler
(Consumer<ServerFrame> handler) void
accept
(ServerFrame item) ackHandler
(Consumer<ServerFrame> handler) authProvider
(AuthenticationProvider handler) beginHandler
(Consumer<ServerFrame> handler) bridge
(io.vertx.ext.stomp.BridgeOptions options) closeHandler
(Consumer<StompServerConnection> handler) commitHandler
(Consumer<ServerFrame> handler) connectHandler
(Consumer<ServerFrame> handler) static StompServerHandler
destinationFactory
(DestinationFactory factory) disconnectHandler
(Consumer<ServerFrame> handler) boolean
io.vertx.ext.stomp.StompServerHandler
getDestination
(String destination) getOrCreateDestination
(String destination) getUserBySession
(String session) void
handle
(ServerFrame arg0) int
hashCode()
nackHandler
(Consumer<ServerFrame> handler) static StompServerHandler
newInstance
(io.vertx.ext.stomp.StompServerHandler arg) onAck
(StompServerConnection connection, io.vertx.ext.stomp.Frame subscribe, List<io.vertx.ext.stomp.Frame> messages) onAckHandler
(Consumer<Acknowledgement> handler) io.smallrye.mutiny.Uni<Boolean>
onAuthenticationRequest
(StompServerConnection connection, String login, String passcode) Called when the client connects to a server requiring authentication.onAuthenticationRequestAndAwait
(StompServerConnection connection, String login, String passcode) onAuthenticationRequestAndForget
(StompServerConnection connection, String login, String passcode) Variant ofonAuthenticationRequest(io.vertx.mutiny.ext.stomp.StompServerConnection,String,String)
that ignores the result of the operation.void
onClose
(StompServerConnection connection) onNack
(StompServerConnection connection, io.vertx.ext.stomp.Frame subscribe, List<io.vertx.ext.stomp.Frame> messages) onNackHandler
(Consumer<Acknowledgement> handler) pingHandler
(Consumer<StompServerConnection> handler) receivedFrameHandler
(Consumer<ServerFrame> handler) sendHandler
(Consumer<ServerFrame> handler) stompHandler
(Consumer<ServerFrame> handler) subscribeHandler
(Consumer<ServerFrame> handler) toString()
unsubscribeHandler
(Consumer<ServerFrame> handler)
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
StompServerHandler
public StompServerHandler(io.vertx.ext.stomp.StompServerHandler delegate) -
StompServerHandler
-
-
Method Details
-
getDelegate
public io.vertx.ext.stomp.StompServerHandler getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
handle
- Specified by:
handle
in interfaceio.vertx.core.Handler<ServerFrame>
-
create
- Parameters:
vertx
- the vert.x instance to use- Returns:
- the created
StompServerHandler
-
receivedFrameHandler
- Parameters:
handler
- the handler- Returns:
-
connectHandler
- Parameters:
handler
- the handler- Returns:
-
stompHandler
- Parameters:
handler
- the handler- Returns:
-
subscribeHandler
- Parameters:
handler
- the handler- Returns:
-
unsubscribeHandler
- Parameters:
handler
- the handler- Returns:
-
sendHandler
- Parameters:
handler
- the handler- Returns:
-
closeHandler
- Parameters:
handler
- the handler- Returns:
-
onClose
- Parameters:
connection
- the connection
-
commitHandler
- Parameters:
handler
- the handler- Returns:
-
abortHandler
- Parameters:
handler
- the handler- Returns:
-
beginHandler
- Parameters:
handler
- the handler- Returns:
-
disconnectHandler
- Parameters:
handler
- the handler- Returns:
-
ackHandler
- Parameters:
handler
- the handler- Returns:
-
nackHandler
- Parameters:
handler
- the handler- Returns:
-
onAuthenticationRequest
@CheckReturnValue public io.smallrye.mutiny.Uni<Boolean> onAuthenticationRequest(StompServerConnection connection, String login, String passcode) Called when the client connects to a server requiring authentication. It invokes the configured usingauthProvider(io.vertx.mutiny.ext.auth.authentication.AuthenticationProvider)
.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
connection
- server connection that contains session IDlogin
- the loginpasscode
- the password- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
onAuthenticationRequestAndAwait
public Boolean onAuthenticationRequestAndAwait(StompServerConnection connection, String login, String passcode) Blocking variant ofonAuthenticationRequest(io.vertx.mutiny.ext.stomp.StompServerConnection,String,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:
connection
- server connection that contains session IDlogin
- the loginpasscode
- the password- Returns:
- the Boolean instance produced by the operation.
-
onAuthenticationRequestAndForget
public StompServerHandler onAuthenticationRequestAndForget(StompServerConnection connection, String login, String passcode) Variant ofonAuthenticationRequest(io.vertx.mutiny.ext.stomp.StompServerConnection,String,String)
that ignores the result of the operation.This method subscribes on the result of
onAuthenticationRequest(io.vertx.mutiny.ext.stomp.StompServerConnection,String,String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromonAuthenticationRequest(io.vertx.mutiny.ext.stomp.StompServerConnection,String,String)
but you don't need to compose it with other operations.- Parameters:
connection
- server connection that contains session IDlogin
- the loginpasscode
- the password- Returns:
- the instance of StompServerHandler to chain method calls.
-
getUserBySession
- Parameters:
session
- session ID for the server connection.- Returns:
- null if not authenticated.
-
authProvider
- Parameters:
handler
- the handler- Returns:
- the current
StompServerHandler
-
getDestinations
- Returns:
- the list of destination managed by the STOMP server. Don't forget the STOMP interprets destination as opaque Strings.
-
getDestination
- Parameters:
destination
- the destination- Returns:
- the
Destination
,null
if not existing.
-
onAck
public StompServerHandler onAck(StompServerConnection connection, io.vertx.ext.stomp.Frame subscribe, List<io.vertx.ext.stomp.Frame> messages) - Parameters:
connection
- the connectionsubscribe
- theSUBSCRIBE
framemessages
- the acknowledge messages- Returns:
- the current
StompServerHandler
-
onNack
public StompServerHandler onNack(StompServerConnection connection, io.vertx.ext.stomp.Frame subscribe, List<io.vertx.ext.stomp.Frame> messages) - Parameters:
connection
- the connectionsubscribe
- theSUBSCRIBE
framemessages
- the acknowledge messages- Returns:
- the current
StompServerHandler
-
onAckHandler
- Parameters:
handler
- the handler- Returns:
-
onNackHandler
- Parameters:
handler
- the handler- Returns:
-
pingHandler
- Parameters:
handler
- the action to execute when a `PING` needs to be sent.- Returns:
-
getOrCreateDestination
- Parameters:
destination
- the destination- Returns:
- the
Destination
instance, may have been created.
-
destinationFactory
- Parameters:
factory
- the factory- Returns:
- the current
StompServerHandler
.
-
bridge
- Parameters:
options
- the configuration options- Returns:
- the current
StompServerHandler
.
-
accept
- Specified by:
accept
in interfaceConsumer<ServerFrame>
-
newInstance
-