@ChannelHandler.Sharable
public class HelloWorldHttp2Handler
extends io.netty.channel.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.
| Constructor and Description |
|---|
HelloWorldHttp2Handler() |
| Modifier and Type | Method and Description |
|---|---|
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
void |
onDataRead(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http2.Http2DataFrame data)
If receive a frame with end-of-stream set, send a pre-canned response.
|
void |
onHeadersRead(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http2.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, userEventTriggeredhandlerAdded, handlerRemoved, isSharablepublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
throws Exception
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
throws Exception
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void onDataRead(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http2.Http2DataFrame data)
throws Exception
ExceptionCopyright © 2008–2016 The Netty Project. All rights reserved.