public class ReactorTcpConnection<P> extends Object implements TcpConnection<P>
| Constructor and Description |
|---|
ReactorTcpConnection(reactor.tcp.TcpConnection<Message<P>,Message<P>> connection) |
| 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.
|
org.springframework.util.concurrent.ListenableFuture<Void> |
send(Message<P> message)
Send the given message.
|
public org.springframework.util.concurrent.ListenableFuture<Void> send(Message<P> message)
TcpConnectionsend in interface TcpConnection<P>message - the messagepublic void onReadInactivity(Runnable runnable, long inactivityDuration)
TcpConnectiononReadInactivity in interface TcpConnection<P>runnable - the task to invokeinactivityDuration - the amount of inactive time in millisecondspublic void onWriteInactivity(Runnable runnable, long inactivityDuration)
TcpConnectiononWriteInactivity in interface TcpConnection<P>runnable - the task to invokeinactivityDuration - the amount of inactive time in millisecondspublic void close()
TcpConnectionclose in interface TcpConnection<P>