public class Http2ClientInitializer extends ChannelInitializer<SocketChannel>
ChannelHandler.Sharable
构造器和说明 |
---|
Http2ClientInitializer(SslContext sslCtx,
int maxContentLength) |
限定符和类型 | 方法和说明 |
---|---|
protected void |
configureEndOfPipeline(ChannelPipeline pipeline) |
void |
initChannel(SocketChannel ch)
This method will be called once the
Channel was registered. |
HttpResponseHandler |
responseHandler() |
Http2SettingsHandler |
settingsHandler() |
channelRegistered, exceptionCaught, handlerAdded, handlerRemoved
channelActive, channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggered
ensureNotSharable, isSharable
public Http2ClientInitializer(SslContext sslCtx, int maxContentLength)
public void initChannel(SocketChannel ch) throws java.lang.Exception
ChannelInitializer
Channel
was registered. After the method returns this instance
will be removed from the ChannelPipeline
of the Channel
.initChannel
在类中 ChannelInitializer<SocketChannel>
ch
- the Channel
which was registered.java.lang.Exception
- is thrown if an error occurs. In that case it will be handled by
ChannelInitializer.exceptionCaught(ChannelHandlerContext, Throwable)
which will by default close
the Channel
.public HttpResponseHandler responseHandler()
public Http2SettingsHandler settingsHandler()
protected void configureEndOfPipeline(ChannelPipeline pipeline)