Package io.micronaut.http.client.netty
Class DefaultHttpClient.HttpClientInitializer
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
-
- io.micronaut.http.client.netty.DefaultHttpClient.HttpClientInitializer
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
- Enclosing class:
- DefaultHttpClient
protected class DefaultHttpClient.HttpClientInitializer extends io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>Initializes the HTTP client channel.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHttpClientInitializer(io.netty.handler.ssl.SslContext sslContext, java.lang.String host, int port, boolean stream, boolean proxy, boolean acceptsEvents, java.util.function.Consumer<io.netty.channel.ChannelHandlerContext> contextConsumer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddFinalHandler(io.netty.channel.ChannelPipeline pipeline)Allows overriding the final handler added to the pipeline.protected voidinitChannel(io.netty.channel.socket.SocketChannel ch)-
Methods inherited from class io.netty.channel.ChannelInitializer
channelRegistered, exceptionCaught, handlerAdded, handlerRemoved
-
-
-
-
Constructor Detail
-
HttpClientInitializer
protected HttpClientInitializer(io.netty.handler.ssl.SslContext sslContext, java.lang.String host, int port, boolean stream, boolean proxy, boolean acceptsEvents, java.util.function.Consumer<io.netty.channel.ChannelHandlerContext> contextConsumer)- Parameters:
sslContext- The ssl contexthost- The hostport- The portstream- Whether is streamproxy- Is this a streaming proxyacceptsEvents- Whether an event stream is acceptedcontextConsumer- The context consumer
-
-
Method Detail
-
initChannel
protected void initChannel(io.netty.channel.socket.SocketChannel ch)
- Specified by:
initChannelin classio.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>- Parameters:
ch- The channel
-
addFinalHandler
protected void addFinalHandler(io.netty.channel.ChannelPipeline pipeline)
Allows overriding the final handler added to the pipeline.- Parameters:
pipeline- The pipeline
-
-