IN - The type that will be received by the clientOUT - The type that will be sent by the clientpublic class TcpClientSpec<IN,OUT> extends reactor.core.spec.support.EventRoutingComponentSpec<TcpClientSpec<IN,OUT>,TcpClient<IN,OUT>>
TcpClient| Constructor and Description |
|---|
TcpClientSpec(java.lang.Class<? extends TcpClient> clientImpl)
Create a
TcpClient.Spec using the given implementation class. |
| Modifier and Type | Method and Description |
|---|---|
TcpClientSpec<IN,OUT> |
codec(reactor.io.encoding.Codec<reactor.io.Buffer,IN,OUT> codec)
The
Codec to use to encode and decode data. |
protected TcpClient<IN,OUT> |
configure(reactor.core.Reactor reactor,
reactor.core.Environment env) |
TcpClientSpec<IN,OUT> |
connect(java.net.InetSocketAddress connectAddress)
The address to which this client should connect.
|
TcpClientSpec<IN,OUT> |
connect(java.lang.String host,
int port)
The host and port to which this client should connect.
|
TcpClientSpec<IN,OUT> |
consume(java.util.Collection<reactor.function.Consumer<IN>> consumers)
The
Consumers to use to ingest the incoming data. |
TcpClientSpec<IN,OUT> |
consume(reactor.function.Consumer<IN> consumer)
The
Consumer to use to ingest incoming data. |
TcpClientSpec<IN,OUT> |
options(ClientSocketOptions options)
Set the common
ClientSocketOptions for connections made in this client. |
TcpClientSpec<IN,OUT> |
ssl(SslOptions sslOptions)
Set the options to use for configuring SSL.
|
broadcastEventRouting, configure, consumerInvoker, consumerNotFoundHandler, consumerRegistry, converters, converters, dispatchErrorHandler, eventFilter, eventRouter, firstEventRouting, randomEventRouting, roundRobinEventRouting, traceEventPath, traceEventPath, uncaughtErrorHandlerpublic TcpClientSpec<IN,OUT> options(ClientSocketOptions options)
ClientSocketOptions for connections made in this client.options - The socket options to apply to new connections.public TcpClientSpec<IN,OUT> ssl(@Nullable SslOptions sslOptions)
null means don't use SSL at all (the default).sslOptions - The options to set when configuring SSLpublic TcpClientSpec<IN,OUT> connect(@Nonnull java.lang.String host, int port)
host - The host to connect to.port - The port to connect to.public TcpClientSpec<IN,OUT> connect(@Nonnull java.net.InetSocketAddress connectAddress)
connectAddress - The address to connect to.public TcpClientSpec<IN,OUT> codec(@Nullable reactor.io.encoding.Codec<reactor.io.Buffer,IN,OUT> codec)
Codec to use to encode and decode data.codec - The codec to use.public TcpClientSpec<IN,OUT> consume(reactor.function.Consumer<IN> consumer)
Consumer to use to ingest incoming data.consumer - the incoming data Consumerpublic TcpClientSpec<IN,OUT> consume(java.util.Collection<reactor.function.Consumer<IN>> consumers)
Consumers to use to ingest the incoming data.consumers - the incoming data Consumers