Package: io.vertx.groovy.ext.stomp

## [Groovy] Class StompServerConnection

- io.vertx.groovy.ext.stomp.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.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `StompServerConnection (Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `close()` Closes the connection with the client.
    `void` | `configureHeartbeat(long ping, long pong, Handler<StompServerConnection> pingHandler)` Configures the heartbeat.
    `Object` | `getDelegate()`
    `StompServerHandler` | `handler()` @return Returns: the STOMP server handler dealing with this connection
    `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()` Returns: the STOMP server serving this connection.
    `String` | `session()` @return Returns: the STOMP session id computed when the client has established the connection to the server
    `StompServerConnection` | `write(Map<String, Object> frame = [:])` Writes the given frame to the socket.
    `StompServerConnection` | `write(Buffer buffer)` Writes the given buffer to the socket.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Constructor Detail

    - #### StompServerConnection(Object delegate)

  - ### Method Detail

    - #### void close()

      Closes the connection with the client.

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

      Configures the heartbeat.

      Parameters:
        `ping` - ping time
        `pong` - pong time
        `pingHandler` - the ping handler

    - #### Object getDelegate()

    - #### StompServerHandler handler()

      Returns:
        the STOMP server handler dealing with this connection

    - #### void onServerActivity()

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

    - #### void ping()

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

    - #### StompServer server()

      Returns:
        the STOMP server serving this connection.

    - #### String session()

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

    - #### StompServerConnection write(Map<String, Object> frame = [:])

      Writes the given frame to the socket.

      Returns:
        the current StompServerConnection
      Parameters:
        `frame` - the frame, must not be `null`. (see Frame)

    - #### StompServerConnection write(Buffer buffer)

      Writes the given buffer to the socket. This is a low level API that should be used carefully.

      Returns:
        the current StompServerConnection
      Parameters:
        `buffer` - the buffer