TcpOperations.
This class is based on ReactorNettyTcpClient.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final ChannelGroup | |
| private final TcpMessageCodec | |
| private Log | |
| private final LoopResources | |
| private final ConnectionProvider | |
| private static final int | |
| private final Scheduler | |
| private volatile boolean | |
| private final TcpClient |
| Access | Constructor and Description |
|---|---|
| public | ReactorNetty2TcpClient(String
the host to connect to host, int the port to connect to port, TcpMessageCodec<P> for encoding and decoding the input/output byte streams codec)Simple constructor with the host and port to use to connect to. |
| public | ReactorNetty2TcpClient(Function<TcpClient, TcpClient>
the configurer function clientConfigurer, TcpMessageCodec<P> for encoding and decoding the input/output byte streams codec)A variant of |
| public | ReactorNetty2TcpClient(TcpClient
the TcpClient instance to use tcpClient, TcpMessageCodec<P> for encoding and decoding the input/output byte streams codec)Constructor with an externally created |
| Modifier and Type | Method and Description |
|---|---|
| public CompletableFuture | connectAsync(TcpConnectionHandler<P>
a handler to manage the connection handler)Implements org. Open a new connection. |
| public CompletableFuture | connectAsync(TcpConnectionHandler<P>
a handler to manage the connection handler, ReconnectStrategy a strategy for reconnecting strategy)Implements org. Open a new connection and a strategy for reconnecting if the connection fails. |
| protected TcpClient | Returns: the same handler or an updated instancethe candidate TcpClient tcpClient, TcpConnectionHandler<P> the handler for the TCP connection handler)Provides an opportunity to initialize the |
| public Log | |
| private CompletableFuture | |
| private Publisher | |
| public void | |
| public CompletableFuture | shutdownAsync()
Implements org. Shut down and close any open connections. |
| private Mono | |
| public String |
| channelGroup | back to summary |
|---|---|
| private final ChannelGroup channelGroup
| |
| codec | back to summary |
|---|---|
| private final TcpMessageCodec<P> codec | |
| logger | back to summary |
|---|---|
| private Log logger | |
| loopResources | back to summary |
|---|---|
| private final LoopResources loopResources
| |
| poolResources | back to summary |
|---|---|
| private final ConnectionProvider poolResources
| |
| PUBLISH_ON_BUFFER_SIZE | back to summary |
|---|---|
| private static final int PUBLISH_ON_BUFFER_SIZE | |
| scheduler | back to summary |
|---|---|
| private final Scheduler scheduler | |
| stopping | back to summary |
|---|---|
| private volatile boolean stopping | |
| tcpClient | back to summary |
|---|---|
| private final TcpClient tcpClient | |
| ReactorNetty2TcpClient | back to summary |
|---|---|
| public ReactorNetty2TcpClient(String host, int port, TcpMessageCodec<P> codec) Simple constructor with the host and port to use to connect to. This constructor manages the lifecycle of the For full control over the initialization and lifecycle of the
TcpClient, use
| |
| ReactorNetty2TcpClient | back to summary |
|---|---|
| public ReactorNetty2TcpClient(Function<TcpClient, TcpClient> clientConfigurer, TcpMessageCodec<P> codec) A variant of
| |
| ReactorNetty2TcpClient | back to summary |
|---|---|
| public ReactorNetty2TcpClient(TcpClient tcpClient, TcpMessageCodec<P> codec) Constructor with an externally created
| |
| connectAsync | back to summary |
|---|---|
| public CompletableFuture Implements org. Doc from org. Open a new connection.
| |
| connectAsync | back to summary |
|---|---|
| public CompletableFuture Implements org. Doc from org. Open a new connection and a strategy for reconnecting if the connection fails.
| |
| extendTcpClient | back to summary |
|---|---|
| protected TcpClient extendTcpClient(TcpClient tcpClient, TcpConnectionHandler<P> handler) Provides an opportunity to initialize the
| |
| getLogger | back to summary |
|---|---|
| public Log getLogger() Return the currently configured Logger.
| |
| handleShuttingDownConnectFailure | back to summary |
|---|---|
| private CompletableFuture | |
| reconnect | back to summary |
|---|---|
| private Publisher | |
| setLogger | back to summary |
|---|---|
| public void setLogger(Log logger) Set an alternative logger to use than the one based on the class name.
| |
| shutdownAsync | back to summary |
|---|---|
| public CompletableFuture Implements org. Doc from org. Shut down and close any open connections.
| |
| stopScheduler | back to summary |
|---|---|
| private Mono | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Field and Description |
|---|---|
| private final TcpConnectionHandler |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Publisher | apply(NettyInbound
the first function argument inbound, NettyOutbound the second function argument outbound)Implements java. Applies this function to the given arguments. |
| connectionHandler | back to summary |
|---|---|
| private final TcpConnectionHandler<P> connectionHandler | |
| ReactorNettyHandler | back to summary |
|---|---|
| pack-priv ReactorNettyHandler(TcpConnectionHandler<P> handler) | |
| apply | back to summary |
|---|---|
| public Publisher Implements java. Doc from java. Applies this function to the given arguments.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final TcpMessageCodec |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected void | decode(ChannelHandlerContext
the ctx, Buffer ChannelHandlerContext which this ByteToMessageDecoder belongs tothe buffer)Buffer from which to read dataImplements abstract io. Decode the from one |
| codec | back to summary |
|---|---|
| private final TcpMessageCodec<P> codec | |
| StompMessageDecoder | back to summary |
|---|---|
| pack-priv StompMessageDecoder(TcpMessageCodec<P> codec) | |
| decode | back to summary |
|---|---|
| protected void decode(ChannelHandlerContext ctx, Buffer buffer) throws Exception Implements abstract io. Doc from io. Decode the from one
| |