IN - The type that will be received by this clientOUT - The type that will be sent by this clientpublic class NettyHttpClient<IN,OUT> extends HttpClient<IN,OUT>
TcpClient.PINGstarted| Constructor and Description |
|---|
NettyHttpClient(reactor.Environment env,
reactor.core.Dispatcher dispatcher,
reactor.fn.Supplier<java.net.InetSocketAddress> connectAddress,
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 |
bindChannel(ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> handler,
java.lang.Object nativeChannel) |
protected reactor.rx.Promise<java.lang.Void> |
doShutdown() |
protected reactor.rx.Promise<java.lang.Void> |
doStart(ReactorChannelHandler<IN,OUT,HttpChannel<IN,OUT>> handler) |
protected reactor.rx.Stream<reactor.fn.tuple.Tuple2<java.net.InetSocketAddress,java.lang.Integer>> |
doStart(ReactorChannelHandler<IN,OUT,HttpChannel<IN,OUT>> handler,
Reconnect reconnect) |
reactor.rx.Promise<? extends HttpChannel<IN,OUT>> |
request(Method method,
java.lang.String url,
ReactorChannelHandler<IN,OUT,HttpChannel<IN,OUT>> handler)
Use the passed HTTP method to send to the given URL.
|
delete, delete, get, get, post, put, ws, wsstartgetDefaultCodec, getDefaultDispatcher, getDefaultEnvironment, getDefaultPrefetchSize, shutdown, startpublic NettyHttpClient(reactor.Environment env,
reactor.core.Dispatcher dispatcher,
reactor.fn.Supplier<java.net.InetSocketAddress> connectAddress,
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 eventsconnectAddress - The root host and port to connect relatively from in http handlersoptions - 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,HttpChannel<IN,OUT>> handler)
doStart in class ReactorPeer<IN,OUT,HttpChannel<IN,OUT>>protected reactor.rx.Stream<reactor.fn.tuple.Tuple2<java.net.InetSocketAddress,java.lang.Integer>> doStart(ReactorChannelHandler<IN,OUT,HttpChannel<IN,OUT>> handler, Reconnect reconnect)
doStart in class ReactorClient<IN,OUT,HttpChannel<IN,OUT>>public reactor.rx.Promise<? extends HttpChannel<IN,OUT>> request(Method method, java.lang.String url, ReactorChannelHandler<IN,OUT,HttpChannel<IN,OUT>> handler)
HttpClientrequest in class HttpClient<IN,OUT>method - the HTTP method to sendurl - the target remote URLhandler - the ReactorChannelHandler to invoke on open channelPromise of the HttpChannel ready to consume for responseprotected final reactor.rx.Promise<java.lang.Void> doShutdown()
doShutdown in class ReactorPeer<IN,OUT,HttpChannel<IN,OUT>>protected void bindChannel(ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> handler, java.lang.Object nativeChannel)