Class ReactorNetty2TcpConnection<P>

java.lang.Object
org.springframework.messaging.tcp.reactor.ReactorNetty2TcpConnection<P>
Type Parameters:
P - the type of payload for outbound messages
All Implemented Interfaces:
Closeable, AutoCloseable, TcpConnection<P>

@Deprecated(since="6.2.18", forRemoval=true) public class ReactorNetty2TcpConnection<P> extends Object implements TcpConnection<P>
Deprecated, for removal: This API element is subject to removal in a future version.
as of 6.2.18 with no replacement
Reactor Netty based implementation of TcpConnection.

This class is based on ReactorNettyTcpConnection.

Since:
6.0
Author:
Rossen Stoyanchev
  • Constructor Summary

    Constructors
    Constructor
    Description
    ReactorNetty2TcpConnection(reactor.netty5.NettyInbound inbound, reactor.netty5.NettyOutbound outbound, TcpMessageCodec<P> codec, reactor.core.publisher.Sinks.Empty<Void> completionSink)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Close the connection.
    void
    onReadInactivity(Runnable runnable, long inactivityDuration)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Register a task to invoke after a period of read inactivity.
    void
    onWriteInactivity(Runnable runnable, long inactivityDuration)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Register a task to invoke after a period of write inactivity.
    sendAsync(Message<P> message)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Send the given message.
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.springframework.messaging.tcp.TcpConnection

    send
  • Constructor Details

    • ReactorNetty2TcpConnection

      public ReactorNetty2TcpConnection(reactor.netty5.NettyInbound inbound, reactor.netty5.NettyOutbound outbound, TcpMessageCodec<P> codec, reactor.core.publisher.Sinks.Empty<Void> completionSink)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • sendAsync

      public CompletableFuture<Void> sendAsync(Message<P> message)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: TcpConnection
      Send the given message.
      Specified by:
      sendAsync in interface TcpConnection<P>
      Parameters:
      message - the message
      Returns:
      a CompletableFuture that can be used to determine when and if the message was successfully sent
    • onReadInactivity

      public void onReadInactivity(Runnable runnable, long inactivityDuration)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: TcpConnection
      Register a task to invoke after a period 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)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: TcpConnection
      Register a task to invoke after a period 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()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: TcpConnection
      Close the connection.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface TcpConnection<P>
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class Object