vertx-lang-scala-docs_2.12 3.4.1 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.

   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.

   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.

   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.

   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.

    options

      the configuration optionssee BridgeOptions

    returns

      the current StompServerHandler.

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

    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.

    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.

    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.

    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.

    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
21.  def getDestination(destination: String): Destination

    Gets the destination with the given name.

    Gets the destination with the given name.

    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.

    destination

      the destination

    returns

      the Destination instance, may have been created.

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

    handler

      the handler

    returns

      the current StompServerHandler

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

    connection

      the connection

    subscribe

      the `SUBSCRIBE` framesee Frame

    messages

      the acknowledge messages

    returns

      the current StompServerHandler

32.  def onAckHandler(handler: Handler[Acknowledgement]): StompServerHandler

    Configures the action to execute when messages are acknowledged.

    Configures the action to execute when messages are acknowledged.

    handler

      the handler

    returns

      the current StompServerHandler

33.  def onAuthenticationRequest(server: StompServer, 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.

    server

      the STOMP server.

    login

      the login

    passcode

      the password

    handler

      handler receiving the authentication result

    returns

      the current StompServerHandler

34.  def onAuthenticationRequestFuture(server: StompServer, login: String, passcode: String): Future[Boolean]

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

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

    connection

      the connection

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

    connection

      the connection

    subscribe

      the `SUBSCRIBE` framesee Frame

    messages

      the acknowledge messages

    returns

      the current StompServerHandler

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

    handler

      the handler

    returns

      the current StompServerHandler

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

    handler

      the action to execute when a `PING` needs to be sent.

    returns

      the current StompServerHandler

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

    handler

      the handler

    returns

      the current StompServerHandler

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

    handler

      the handler

    returns

      the current StompServerHandler

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

    handler

      the handler

    returns

      the current StompServerHandler

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

    handler

      the handler

    returns

      the current StompServerHandler

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

    handler

      the handler

    returns

      the current StompServerHandler

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

### Inherited from Handler[ServerFrame]

### Inherited from AnyRef

### Inherited from Any

### Ungrouped