IN
- The type that will be received by the clientOUT
- The type that will be sent by the clientpublic static class Spec.TcpClientSpec<IN,OUT> extends DispatcherComponentSpec<Spec.TcpClientSpec<IN,OUT>,TcpClient<IN,OUT>>
TcpClient
Modifier and Type | Method and Description |
---|---|
Spec.TcpClientSpec<IN,OUT> |
codec(Codec<Buffer,IN,OUT> codec)
The
Codec to use to encode and decode data. |
protected TcpClient<IN,OUT> |
configure(Dispatcher dispatcher,
Environment environment) |
Spec.TcpClientSpec<IN,OUT> |
connect(InetSocketAddress connectAddress)
The address to which this client should connect.
|
Spec.TcpClientSpec<IN,OUT> |
connect(String host,
int port)
The host and port to which this client should connect.
|
Spec.TcpClientSpec<IN,OUT> |
connect(Supplier<InetSocketAddress> connectAddress)
The eventual address to which this client should connect.
|
Spec.TcpClientSpec<IN,OUT> |
options(ClientSocketOptions options)
Set the common
ClientSocketOptions for connections made in this client. |
Spec.TcpClientSpec<IN,OUT> |
rawData(boolean israw)
Bypass any Reactor Buffer encoding for received data
|
Spec.TcpClientSpec<IN,OUT> |
ssl(SslOptions sslOptions)
Set the options to use for configuring SSL.
|
defaultDispatcher, dispatcher, dispatcher, env, get, synchronousDispatcher
public Spec.TcpClientSpec<IN,OUT> options(ClientSocketOptions options)
ClientSocketOptions
for connections made in this client.options
- The socket options to apply to new connections.public Spec.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 Spec.TcpClientSpec<IN,OUT> connect(@Nonnull String host, int port)
host
- The host to connect to.port
- The port to connect to.public Spec.TcpClientSpec<IN,OUT> connect(@Nonnull InetSocketAddress connectAddress)
connectAddress
- The address to connect to.public Spec.TcpClientSpec<IN,OUT> connect(@Nonnull Supplier<InetSocketAddress> connectAddress)
connectAddress
- The address to connect to.public Spec.TcpClientSpec<IN,OUT> codec(@Nullable Codec<Buffer,IN,OUT> codec)
Codec
to use to encode and decode data.codec
- The codec to use.public Spec.TcpClientSpec<IN,OUT> rawData(boolean israw)
israw
- to enable raw data transfer from the server (e.g. ByteBuf from Netty).protected TcpClient<IN,OUT> configure(Dispatcher dispatcher, Environment environment)
configure
in class DispatcherComponentSpec<Spec.TcpClientSpec<IN,OUT>,TcpClient<IN,OUT>>
Copyright © 2017. All rights reserved.