IN - The type that will be received by this clientOUT - The type that will be sent by this clientpublic class NettyTcpClient<IN,OUT> extends TcpClient<IN,OUT>
TcpClient.connectAddressPINGstarted| Constructor and Description |
|---|
NettyTcpClient(reactor.Environment env,
reactor.core.Dispatcher dispatcher,
reactor.fn.Supplier<java.net.InetSocketAddress> hostSupplier,
ClientSocketOptions options,
SslOptions sslOptions,
reactor.io.codec.Codec<reactor.io.buffer.Buffer,IN,OUT> codec)
Creates a new NettyTcpClient that will use the given
env for configuration and the given reactor to
send events. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addSecureHandler(io.netty.channel.socket.SocketChannel ch) |
protected void |
bindChannel(ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> handler,
io.netty.channel.socket.SocketChannel nativeChannel) |
protected reactor.rx.Promise<java.lang.Void> |
doShutdown() |
protected reactor.rx.Promise<java.lang.Void> |
doStart(ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> handler) |
protected reactor.rx.Stream<reactor.fn.tuple.Tuple2<java.net.InetSocketAddress,java.lang.Integer>> |
doStart(ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> handler,
Reconnect reconnect) |
getConnectAddress, getOptions, getSslOptionsstartgetDefaultCodec, getDefaultDispatcher, getDefaultEnvironment, getDefaultPrefetchSize, shutdown, startpublic NettyTcpClient(reactor.Environment env,
reactor.core.Dispatcher dispatcher,
reactor.fn.Supplier<java.net.InetSocketAddress> hostSupplier,
ClientSocketOptions options,
SslOptions sslOptions,
reactor.io.codec.Codec<reactor.io.buffer.Buffer,IN,OUT> codec)
env for configuration and the given reactor to
send events. The number of IO threads used by the client is configured by the environment's reactor.tcp.ioThreadCount property. In its absence the number of IO threads will be equal to the number of available processors. The client will connect to the given connectAddress, configuring its socket using the given opts. The given codec will be used for
encoding and decoding of data.env - The configuration environmentdispatcher - The dispatcher used to send eventshostSupplier - The address the client will connect tooptions - The configuration options for the client's socketsslOptions - The SSL configuration options for the client's socketcodec - The codec used to encode and decode dataprotected reactor.rx.Promise<java.lang.Void> doStart(ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> handler)
doStart in class ReactorPeer<IN,OUT,ChannelStream<IN,OUT>>protected void addSecureHandler(io.netty.channel.socket.SocketChannel ch)
throws java.lang.Exception
java.lang.Exceptionprotected reactor.rx.Stream<reactor.fn.tuple.Tuple2<java.net.InetSocketAddress,java.lang.Integer>> doStart(ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> handler, Reconnect reconnect)
doStart in class ReactorClient<IN,OUT,ChannelStream<IN,OUT>>protected reactor.rx.Promise<java.lang.Void> doShutdown()
doShutdown in class ReactorPeer<IN,OUT,ChannelStream<IN,OUT>>protected void bindChannel(ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> handler, io.netty.channel.socket.SocketChannel nativeChannel)