org.springframework.messaging.tcp.reactor

## Class ReactorTcpConnection<P>

- java.lang.Object
- - org.springframework.messaging.tcp.reactor.ReactorTcpConnection<P>

- All Implemented Interfaces:
    TcpConnection<P>

      public class ReactorTcpConnection<P>
      extends Object
      implements TcpConnection<P>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReactorTcpConnection(reactor.tcp.TcpConnection<Message<P>,Message<P>> connection)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close the connection.
    `void` | `onReadInactivity(Runnable runnable, long inactivityDuration)` Register a task to invoke after a period of of read inactivity.
    `void` | `onWriteInactivity(Runnable runnable, long inactivityDuration)` Register a task to invoke after a period of of write inactivity.
    `ListenableFuture<Void>` | `send(Message<P> message)` Send the given message.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ReactorTcpConnection

          public ReactorTcpConnection(reactor.tcp.TcpConnection<Message<P>,Message<P>> connection)

  - ### Method Detail

    - #### send

          public ListenableFuture<Void> send(Message<P> message)

      Description copied from interface: `TcpConnection`
      Send the given message.
      Specified by:
        `send` in interface `TcpConnection<P>`
      Parameters:
        `message` - the message
      Returns:
        a ListenableFuture that can be used to determine when and if the message was successfully sent

    - #### onReadInactivity

          public void onReadInactivity(Runnable runnable,
                                       long inactivityDuration)

      Description copied from interface: `TcpConnection`
      Register a task to invoke after a period of of read inactivity.
      Specified by:
        `onReadInactivity` in interface `TcpConnection<P>`
      Parameters:
        `runnable` - the task to invoke
        `inactivityDuration` - the amount of inactive time in milliseconds

    - #### onWriteInactivity

          public void onWriteInactivity(Runnable runnable,
                                        long inactivityDuration)

      Description copied from interface: `TcpConnection`
      Register a task to invoke after a period of of write inactivity.
      Specified by:
        `onWriteInactivity` in interface `TcpConnection<P>`
      Parameters:
        `runnable` - the task to invoke
        `inactivityDuration` - the amount of inactive time in milliseconds

    - #### close

          public void close()

      Description copied from interface: `TcpConnection`
      Close the connection.
      Specified by:
        `close` in interface `TcpConnection<P>`