public class StompServerHandler extends Object implements io.vertx.core.Handler<ServerFrame>
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static TypeArg<StompServerHandler> |
__TYPE_ARG |
Constructor and Description |
---|
StompServerHandler(Object delegate) |
StompServerHandler(io.vertx.ext.stomp.StompServerHandler delegate) |
Modifier and Type | Method and Description |
---|---|
StompServerHandler |
abortHandler(io.vertx.core.Handler<ServerFrame> handler)
Configures the action to execute when a
ABORT frame is received. |
StompServerHandler |
ackHandler(io.vertx.core.Handler<ServerFrame> handler)
Configures the action to execute when a
ACK frame is received. |
StompServerHandler |
authProvider(AuthProvider handler)
Configures the to be used to authenticate the user.
|
StompServerHandler |
beginHandler(io.vertx.core.Handler<ServerFrame> handler)
Configures the action to execute when a
BEGIN frame is received. |
StompServerHandler |
bridge(io.vertx.ext.stomp.BridgeOptions options)
Configures the STOMP server to act as a bridge with the Vert.x event bus.
|
StompServerHandler |
closeHandler(io.vertx.core.Handler<StompServerConnection> handler)
Configures the action to execute when a connection with the client is closed.
|
StompServerHandler |
commitHandler(io.vertx.core.Handler<ServerFrame> handler)
Configures the action to execute when a
COMMIT frame is received. |
StompServerHandler |
connectHandler(io.vertx.core.Handler<ServerFrame> handler)
Configures the action to execute when a
CONNECT frame is received. |
static StompServerHandler |
create(Vertx vertx)
Creates an instance of
StompServerHandler using the default (compliant) implementation. |
StompServerHandler |
destinationFactory(DestinationFactory factory)
Configures the
DestinationFactory used to create Destination objects. |
StompServerHandler |
disconnectHandler(io.vertx.core.Handler<ServerFrame> handler)
Configures the action to execute when a
DISCONNECT frame is received. |
boolean |
equals(Object o) |
io.vertx.ext.stomp.StompServerHandler |
getDelegate() |
Destination |
getDestination(String destination)
Gets the destination with the given name.
|
List<Destination> |
getDestinations() |
Destination |
getOrCreateDestination(String destination)
Gets a
Destination object if existing, or create a new one. |
User |
getUserBySession(String session)
Provides for authorization matches on a destination level, this will return the User created by the .
|
void |
handle(ServerFrame event)
Something has happened, so handle it.
|
int |
hashCode() |
StompServerHandler |
nackHandler(io.vertx.core.Handler<ServerFrame> handler)
Configures the action to execute when a
NACK frame is received. |
static StompServerHandler |
newInstance(io.vertx.ext.stomp.StompServerHandler arg) |
StompServerHandler |
onAck(StompServerConnection connection,
io.vertx.ext.stomp.Frame subscribe,
List<io.vertx.ext.stomp.Frame> messages)
Method called by single message (client-individual policy) or a set of message (client policy) are acknowledged.
|
StompServerHandler |
onAckHandler(io.vertx.core.Handler<Acknowledgement> handler)
Configures the action to execute when messages are acknowledged.
|
StompServerHandler |
onAuthenticationRequest(StompServerConnection connection,
String login,
String passcode,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Boolean>> handler)
Called when the client connects to a server requiring authentication.
|
void |
onClose(StompServerConnection connection)
Called when the connection is closed.
|
StompServerHandler |
onNack(StompServerConnection connection,
io.vertx.ext.stomp.Frame subscribe,
List<io.vertx.ext.stomp.Frame> messages)
Method called by single message (client-individual policy) or a set of message (client policy) are
not acknowledged.
|
StompServerHandler |
onNackHandler(io.vertx.core.Handler<Acknowledgement> handler)
Configures the action to execute when messages are not acknowledged.
|
StompServerHandler |
pingHandler(io.vertx.core.Handler<StompServerConnection> handler)
Allows customizing the action to do when the server needs to send a `PING` to the client.
|
StompServerHandler |
receivedFrameHandler(io.vertx.core.Handler<ServerFrame> handler)
Configures a handler that get notified when a STOMP frame is received by the server.
|
io.reactivex.Single<Boolean> |
rxOnAuthenticationRequest(StompServerConnection connection,
String login,
String passcode)
Called when the client connects to a server requiring authentication.
|
StompServerHandler |
sendHandler(io.vertx.core.Handler<ServerFrame> handler)
Configures the action to execute when a
SEND frame is received. |
StompServerHandler |
stompHandler(io.vertx.core.Handler<ServerFrame> handler)
Configures the action to execute when a
STOMP frame is received. |
StompServerHandler |
subscribeHandler(io.vertx.core.Handler<ServerFrame> handler)
Configures the action to execute when a
SUBSCRIBE frame is received. |
String |
toString() |
StompServerHandler |
unsubscribeHandler(io.vertx.core.Handler<ServerFrame> handler)
Configures the action to execute when a
UNSUBSCRIBE frame is received. |
public static final TypeArg<StompServerHandler> __TYPE_ARG
public StompServerHandler(io.vertx.ext.stomp.StompServerHandler delegate)
public StompServerHandler(Object delegate)
public io.vertx.ext.stomp.StompServerHandler getDelegate()
public void handle(ServerFrame event)
handle
in interface io.vertx.core.Handler<ServerFrame>
event
- the event to handlepublic static StompServerHandler create(Vertx vertx)
StompServerHandler
using the default (compliant) implementation.vertx
- the vert.x instance to useStompServerHandler
public StompServerHandler receivedFrameHandler(io.vertx.core.Handler<ServerFrame> handler)
handler
- the handlerStompServerHandler
public StompServerHandler connectHandler(io.vertx.core.Handler<ServerFrame> handler)
CONNECT
frame is received.handler
- the handlerStompServerHandler
public StompServerHandler stompHandler(io.vertx.core.Handler<ServerFrame> handler)
STOMP
frame is received.handler
- the handlerStompServerHandler
public StompServerHandler subscribeHandler(io.vertx.core.Handler<ServerFrame> handler)
SUBSCRIBE
frame is received.handler
- the handlerStompServerHandler
public StompServerHandler unsubscribeHandler(io.vertx.core.Handler<ServerFrame> handler)
UNSUBSCRIBE
frame is received.handler
- the handlerStompServerHandler
public StompServerHandler sendHandler(io.vertx.core.Handler<ServerFrame> handler)
SEND
frame is received.handler
- the handlerStompServerHandler
public StompServerHandler closeHandler(io.vertx.core.Handler<StompServerConnection> handler)
handler
- the handlerStompServerHandler
public void onClose(StompServerConnection connection)
closeHandler(io.vertx.core.Handler<io.vertx.reactivex.ext.stomp.StompServerConnection>)
if any.connection
- the connectionpublic StompServerHandler commitHandler(io.vertx.core.Handler<ServerFrame> handler)
COMMIT
frame is received.handler
- the handlerStompServerHandler
public StompServerHandler abortHandler(io.vertx.core.Handler<ServerFrame> handler)
ABORT
frame is received.handler
- the handlerStompServerHandler
public StompServerHandler beginHandler(io.vertx.core.Handler<ServerFrame> handler)
BEGIN
frame is received.handler
- the handlerStompServerHandler
public StompServerHandler disconnectHandler(io.vertx.core.Handler<ServerFrame> handler)
DISCONNECT
frame is received.handler
- the handlerStompServerHandler
public StompServerHandler ackHandler(io.vertx.core.Handler<ServerFrame> handler)
ACK
frame is received.handler
- the handlerStompServerHandler
public StompServerHandler nackHandler(io.vertx.core.Handler<ServerFrame> handler)
NACK
frame is received.handler
- the handlerStompServerHandler
public StompServerHandler onAuthenticationRequest(StompServerConnection connection, String login, String passcode, io.vertx.core.Handler<io.vertx.core.AsyncResult<Boolean>> handler)
authProvider(io.vertx.reactivex.ext.auth.AuthProvider)
.connection
- server connection that contains session IDlogin
- the loginpasscode
- the passwordhandler
- handler receiving the authentication resultStompServerHandler
public io.reactivex.Single<Boolean> rxOnAuthenticationRequest(StompServerConnection connection, String login, String passcode)
authProvider(io.vertx.reactivex.ext.auth.AuthProvider)
.connection
- server connection that contains session IDlogin
- the loginpasscode
- the passwordStompServerHandler
public User getUserBySession(String session)
session
- session ID for the server connection.public StompServerHandler authProvider(AuthProvider handler)
handler
- the handlerStompServerHandler
public List<Destination> getDestinations()
public Destination getDestination(String destination)
destination
- the destinationDestination
, null
if not existing.public StompServerHandler onAck(StompServerConnection connection, io.vertx.ext.stomp.Frame subscribe, List<io.vertx.ext.stomp.Frame> messages)
onAckHandler(io.vertx.core.Handler<io.vertx.reactivex.ext.stomp.Acknowledgement>)
.connection
- the connectionsubscribe
- the SUBSCRIBE
framemessages
- the acknowledge messagesStompServerHandler
public StompServerHandler onNack(StompServerConnection connection, io.vertx.ext.stomp.Frame subscribe, List<io.vertx.ext.stomp.Frame> messages)
NACK
frame or from a timeout (no
ACK
frame received in a given time. Implementations must call the handler configured using
onNackHandler(io.vertx.core.Handler<io.vertx.reactivex.ext.stomp.Acknowledgement>)
.connection
- the connectionsubscribe
- the SUBSCRIBE
framemessages
- the acknowledge messagesStompServerHandler
public StompServerHandler onAckHandler(io.vertx.core.Handler<Acknowledgement> handler)
handler
- the handlerStompServerHandler
public StompServerHandler onNackHandler(io.vertx.core.Handler<Acknowledgement> handler)
handler
- the handlerStompServerHandler
public StompServerHandler pingHandler(io.vertx.core.Handler<StompServerConnection> handler)
EOL
(specification). However, you can customize this and send another frame. However,
be aware that this may requires a custom client.
The handler will only be called if the connection supports heartbeats.handler
- the action to execute when a `PING` needs to be sent.StompServerHandler
public Destination getOrCreateDestination(String destination)
Destination
object if existing, or create a new one. The creation is delegated to the
DestinationFactory
.destination
- the destinationDestination
instance, may have been created.public StompServerHandler destinationFactory(DestinationFactory factory)
DestinationFactory
used to create Destination
objects.factory
- the factoryStompServerHandler
.public StompServerHandler bridge(io.vertx.ext.stomp.BridgeOptions options)
options
- the configuration optionsStompServerHandler
.public static StompServerHandler newInstance(io.vertx.ext.stomp.StompServerHandler arg)
Copyright © 2021 Eclipse. All rights reserved.