vertx-lang-scala-docs_2.12 3.6.3 API < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package io
  Definition Classes
    root
-  package vertx
  Definition Classes
    io
-  package scala
  Definition Classes
    vertx
-  package ext
  Definition Classes
    scala
-  package stomp
  Definition Classes
    ext
- Acknowledgement
- BridgeOptions
- Destination
- DestinationFactory
- Frame
- Frames
- ServerFrame
- StompClient
- StompClientConnection
- StompClientOptions
- StompServer
- StompServerConnection
- StompServerHandler
- StompServerOptions

c

io.vertx.scala.ext.stomp

# StompServerHandler 

###
Companion object StompServerHandler

#### 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.

Linear Supertypes
Handler[ServerFrame], AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. StompServerHandler
2. Handler
3. AnyRef
4. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new StompServerHandler(_asJava: AnyRef)

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  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

5.  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

6.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
7.  def asJava: AnyRef
8.  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

9.  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

10.  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.

11.  def clone(): AnyRef
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @native() @throws( ... )
12.  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

13.  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

14.  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

15.  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.

16.  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

17.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
18.  def equals(arg0: Any): Boolean
    Definition Classes
      AnyRef → Any
19.  def finalize(): Unit
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
20.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
21.  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.

22.  def getDestinations(): Buffer[Destination]

    returns

      the list of destination managed by the STOMP server. Don't forget the STOMP interprets destination as opaque Strings.

23.  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.

24.  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.

25.  def handle(arg0: ServerFrame): Unit
    Definition Classes
      StompServerHandler → Handler
26.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
27.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
28.  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

29.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
30.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
31.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
32.  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

33.  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

34.  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

35.  def onAuthenticationRequestFuture(connection: StompServerConnection, login: String, passcode: String): Future[Boolean]

    Like onAuthenticationRequest but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

36.  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

37.  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 (no `ACK` 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

38.  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

39.  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 containing `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. * @param handler the action to execute when a `PING` needs to be sent.

    returns

      the current StompServerHandler

40.  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

41.  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

42.  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

43.  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

44.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
45.  def toString(): String
    Definition Classes
      AnyRef → Any
46.  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

47.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
48.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
49.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @native() @throws( ... )

### Inherited from Handler[ServerFrame]

### Inherited from AnyRef

### Inherited from Any

### Ungrouped