io.vertx.ext.stomp

## Interface StompServerConnection

-     public interface StompServerConnection

  Class representing a connection between a STOMP client a the server. It keeps a references on the client socket, so let write to this socket.
  Author:
    Clement Escoffier

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Closes the connection with the client.
    `void` | `configureHeartbeat(long ping, long pong, Handler<StompServerConnection> pingHandler)` Configures the heartbeat.
    `StompServerHandler` | `handler()`
    `void` | `onServerActivity()` Notifies the connection about server activity (the server has sent a frame).
    `void` | `ping()` Sends a `PING` frame to the client.
    `StompServer` | `server()`
    `String` | `session()`
    `StompServerConnection` | `write(Buffer buffer)` Writes the given buffer to the socket.
    `StompServerConnection` | `write(Frame frame)` Writes the given frame to the socket.

- - ### Method Detail

    - #### write

          StompServerConnection write(Frame frame)

      Writes the given frame to the socket.
      Parameters:
        `frame` - the frame, must not be `null`.
      Returns:
        the current `StompServerConnection`

    - #### write

          StompServerConnection write(Buffer buffer)

      Writes the given buffer to the socket. This is a low level API that should be used carefully.
      Parameters:
        `buffer` - the buffer
      Returns:
        the current `StompServerConnection`

    - #### server

          StompServer server()

      Returns:
        the STOMP server serving this connection.

    - #### handler

          StompServerHandler handler()

      Returns:
        the STOMP server handler dealing with this connection

    - #### session

          String session()

      Returns:
        the STOMP session id computed when the client has established the connection to the server

    - #### close

          void close()

      Closes the connection with the client.

    - #### ping

          void ping()

      Sends a `PING` frame to the client. A `PING` frame is a frame containing only `EOL`.

    - #### onServerActivity

          void onServerActivity()

      Notifies the connection about server activity (the server has sent a frame). This method is used to handle the heartbeat.

    - #### configureHeartbeat

          void configureHeartbeat(long ping,
                                  long pong,
                                  Handler<StompServerConnection> pingHandler)

      Configures the heartbeat.
      Parameters:
        `ping` - ping time
        `pong` - pong time
        `pingHandler` - the ping handler

Copyright © 2015. All rights reserved.