class StompServerHandler extends Handler[ServerFrame]
STOMP server handler implements the behavior of the STOMP server when a specific event occurs. For instance, if let customize the behavior when specific STOMP frames arrives or when a connection is closed. This class has been designed to let you customize the server behavior. The default implementation is compliant with the STOMP specification. In this default implementation, not acknowledge frames are dropped.
- Alphabetic
- By Inheritance
- StompServerHandler
- Handler
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new StompServerHandler(_asJava: AnyRef)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
abortHandler(handler: Handler[ServerFrame]): StompServerHandler
Configures the action to execute when a
ABORT
frame is received.Configures the action to execute when a
ABORT
frame is received. * @param handler the handler- returns
the current StompServerHandler
-
def
ackHandler(handler: Handler[ServerFrame]): StompServerHandler
Configures the action to execute when a
ACK
frame is received.Configures the action to execute when a
ACK
frame is received. * @param handler the handler- returns
the current StompServerHandler
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: AnyRef
-
def
authProvider(handler: AuthProvider): StompServerHandler
Configures the to be used to authenticate the user.
Configures the to be used to authenticate the user. * @param handler the handler
- returns
the current StompServerHandler
-
def
beginHandler(handler: Handler[ServerFrame]): StompServerHandler
Configures the action to execute when a
BEGIN
frame is received.Configures the action to execute when a
BEGIN
frame is received. * @param handler the handler- returns
the current StompServerHandler
-
def
bridge(options: BridgeOptions): StompServerHandler
Configures the STOMP server to act as a bridge with the Vert.x event bus.
Configures the STOMP server to act as a bridge with the Vert.x event bus. * @param options the configuration options see BridgeOptions
- returns
the current StompServerHandler.
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
closeHandler(handler: Handler[StompServerConnection]): StompServerHandler
Configures the action to execute when a connection with the client is closed.
Configures the action to execute when a connection with the client is closed. * @param handler the handler
- returns
the current StompServerHandler
-
def
commitHandler(handler: Handler[ServerFrame]): StompServerHandler
Configures the action to execute when a
COMMIT
frame is received.Configures the action to execute when a
COMMIT
frame is received. * @param handler the handler- returns
the current StompServerHandler
-
def
connectHandler(handler: Handler[ServerFrame]): StompServerHandler
Configures the action to execute when a
CONNECT
frame is received.Configures the action to execute when a
CONNECT
frame is received. * @param handler the handler- returns
the current StompServerHandler
-
def
destinationFactory(factory: DestinationFactory): StompServerHandler
Configures the io.vertx.scala.ext.stomp.DestinationFactory used to create io.vertx.scala.ext.stomp.Destination objects.
Configures the io.vertx.scala.ext.stomp.DestinationFactory used to create io.vertx.scala.ext.stomp.Destination objects. * @param factory the factory
- returns
the current StompServerHandler.
-
def
disconnectHandler(handler: Handler[ServerFrame]): StompServerHandler
Configures the action to execute when a
DISCONNECT
frame is received.Configures the action to execute when a
DISCONNECT
frame is received. * @param handler the handler- returns
the current StompServerHandler
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getDestination(destination: String): Destination
Gets the destination with the given name.
Gets the destination with the given name. * @param destination the destination
- returns
the Destination,
null
if not existing.
-
def
getDestinations(): Buffer[Destination]
- returns
the list of destination managed by the STOMP server. Don't forget the STOMP interprets destination as opaque Strings.
-
def
getOrCreateDestination(destination: String): Destination
Gets a io.vertx.scala.ext.stomp.Destination object if existing, or create a new one.
Gets a io.vertx.scala.ext.stomp.Destination object if existing, or create a new one. The creation is delegated to the io.vertx.scala.ext.stomp.DestinationFactory. * @param destination the destination
- returns
the Destination instance, may have been created.
-
def
getUserBySession(session: String): User
Provides for authorization matches on a destination level, this will return the User created by the .
Provides for authorization matches on a destination level, this will return the User created by the . * @param session session ID for the server connection.
- returns
null if not authenticated.
-
def
handle(arg0: ServerFrame): Unit
- Definition Classes
- StompServerHandler → Handler
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
nackHandler(handler: Handler[ServerFrame]): StompServerHandler
Configures the action to execute when a
NACK
frame is received.Configures the action to execute when a
NACK
frame is received. * @param handler the handler- returns
the current StompServerHandler
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
onAck(connection: StompServerConnection, subscribe: Frame, messages: Buffer[Frame]): StompServerHandler
Method called by single message (client-individual policy) or a set of message (client policy) are acknowledged.
Method called by single message (client-individual policy) or a set of message (client policy) are acknowledged. Implementations must call the handler configured using io.vertx.scala.ext.stomp.StompServerHandler#onAckHandler. * @param connection the connection
- subscribe
the
SUBSCRIBE
frame see Frame- messages
the acknowledge messages
- returns
the current StompServerHandler
-
def
onAckHandler(handler: Handler[Acknowledgement]): StompServerHandler
Configures the action to execute when messages are acknowledged.
Configures the action to execute when messages are acknowledged. * @param handler the handler
- returns
the current StompServerHandler
-
def
onAuthenticationRequest(connection: StompServerConnection, login: String, passcode: String, handler: Handler[AsyncResult[Boolean]]): StompServerHandler
Called when the client connects to a server requiring authentication.
Called when the client connects to a server requiring authentication. It invokes the configured using io.vertx.scala.ext.stomp.StompServerHandler#authProvider. * @param connection server connection that contains session ID
- login
the login
- passcode
the password
- handler
handler receiving the authentication result
- returns
the current StompServerHandler
-
def
onAuthenticationRequestFuture(connection: StompServerConnection, login: String, passcode: String): Future[Boolean]
Like onAuthenticationRequest but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
onClose(connection: StompServerConnection): Unit
Called when the connection is closed.
Called when the connection is closed. This method executes a default behavior and must calls the configured io.vertx.scala.ext.stomp.StompServerHandler#closeHandler if any. * @param connection the connection
-
def
onNack(connection: StompServerConnection, subscribe: Frame, messages: Buffer[Frame]): StompServerHandler
Method called by single message (client-individual policy) or a set of message (client policy) are not acknowledged.
Method called by single message (client-individual policy) or a set of message (client policy) are not acknowledged. Not acknowledgment can result from a
NACK
frame or from a timeout (noACK
frame received in a given time. Implementations must call the handler configured using io.vertx.scala.ext.stomp.StompServerHandler#onNackHandler. * @param connection the connection- subscribe
the
SUBSCRIBE
frame see Frame- messages
the acknowledge messages
- returns
the current StompServerHandler
-
def
onNackHandler(handler: Handler[Acknowledgement]): StompServerHandler
Configures the action to execute when messages are not acknowledged.
Configures the action to execute when messages are not acknowledged. * @param handler the handler
- returns
the current StompServerHandler
-
def
pingHandler(handler: Handler[StompServerConnection]): StompServerHandler
Allows customizing the action to do when the server needs to send a
PING
to the client.Allows customizing the action to do when the server needs to send a
PING
to the client. By default it send a frame containingEOL
(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. * @param handler the action to execute when a
PING
needs to be sent.- returns
the current StompServerHandler
-
def
receivedFrameHandler(handler: Handler[ServerFrame]): StompServerHandler
Configures a handler that get notified when a STOMP frame is received by the server.
Configures a handler that get notified when a STOMP frame is received by the server. This handler can be used for logging, debugging or ad-hoc behavior. * @param handler the handler
- returns
the current StompServerHandler
-
def
sendHandler(handler: Handler[ServerFrame]): StompServerHandler
Configures the action to execute when a
SEND
frame is received.Configures the action to execute when a
SEND
frame is received. * @param handler the handler- returns
the current StompServerHandler
-
def
stompHandler(handler: Handler[ServerFrame]): StompServerHandler
Configures the action to execute when a
STOMP
frame is received.Configures the action to execute when a
STOMP
frame is received. * @param handler the handler- returns
the current StompServerHandler
-
def
subscribeHandler(handler: Handler[ServerFrame]): StompServerHandler
Configures the action to execute when a
SUBSCRIBE
frame is received.Configures the action to execute when a
SUBSCRIBE
frame is received. * @param handler the handler- returns
the current StompServerHandler
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unsubscribeHandler(handler: Handler[ServerFrame]): StompServerHandler
Configures the action to execute when a
UNSUBSCRIBE
frame is received.Configures the action to execute when a
UNSUBSCRIBE
frame is received. * @param handler the handler- returns
the current StompServerHandler
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )