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 (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `close()` Closes the connection with the client.
    `void` | `configureHeartbeat(long ping, long pong, io.vertx.core.Handler<StompServerConnection> pingHandler)` Configures the heartbeat.
    `java.lang.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.
    `java.lang.String` | `session()` @return Returns: the STOMP session id computed when the client has established the connection to the server
    `StompServerConnection` | `write(java.util.Map<java.lang.String, java.lang.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 java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Constructor Detail

    - #### StompServerConnection(java.lang.Object delegate)

  - ### Method Detail

    - #### void close()

      Closes the connection with the client.

    - #### void configureHeartbeat(long ping, long pong, io.vertx.core.Handler<StompServerConnection> pingHandler)

      Configures the heartbeat.

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

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

    - #### java.lang.String session()

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

    - #### StompServerConnection write(java.util.Map<java.lang.String, java.lang.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