@ChannelHandler.Sharable public class HelloWorldHttp2Handler extends ChannelDuplexHandler
This example is making use of the "multiplexing" http2 API, where streams are mapped to child Channels. This API is very experimental and incomplete.
ChannelHandler.Sharable| Constructor and Description |
|---|
HelloWorldHttp2Handler() |
| Modifier and Type | Method and Description |
|---|---|
void |
channelRead(ChannelHandlerContext ctx,
Object msg)
Calls
ChannelHandlerContext.fireChannelRead(Object) to forward
to the next ChannelInboundHandler in the ChannelPipeline. |
void |
exceptionCaught(ChannelHandlerContext ctx,
Throwable cause)
Calls
ChannelHandlerContext.fireExceptionCaught(Throwable) to forward
to the next ChannelHandler in the ChannelPipeline. |
void |
onDataRead(ChannelHandlerContext ctx,
Http2DataFrame data)
If receive a frame with end-of-stream set, send a pre-canned response.
|
void |
onHeadersRead(ChannelHandlerContext ctx,
Http2HeadersFrame headers)
If receive a frame with end-of-stream set, send a pre-canned response.
|
bind, close, connect, deregister, disconnect, flush, read, writechannelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerAdded, handlerRemovedpublic void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception
ChannelInboundHandlerAdapterChannelHandlerContext.fireExceptionCaught(Throwable) to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.exceptionCaught in interface ChannelHandlerexceptionCaught in interface ChannelInboundHandlerexceptionCaught in class ChannelInboundHandlerAdapterExceptionpublic void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
ChannelInboundHandlerAdapterChannelHandlerContext.fireChannelRead(Object) to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelRead in interface ChannelInboundHandlerchannelRead in class ChannelInboundHandlerAdapterExceptionpublic void onDataRead(ChannelHandlerContext ctx, Http2DataFrame data) throws Exception
Exceptionpublic void onHeadersRead(ChannelHandlerContext ctx, Http2HeadersFrame headers) throws Exception
ExceptionCopyright © 2008–2017 The Netty Project. All rights reserved.