@UnstableApi public class Http2StreamFrameToHttpObjectCodec extends io.netty.handler.codec.MessageToMessageCodec<Http2StreamFrame,io.netty.handler.codec.http.HttpObject>
Http2StreamFrame
to HttpObject
,
and back. It can be used as an adapter in conjunction with Http2MultiplexCodec
to make http/2 connections backward-compatible with
ChannelHandler
s expecting HttpObject
For simplicity, it converts to chunked encoding unless the entire stream
is a single header.Constructor and Description |
---|
Http2StreamFrameToHttpObjectCodec(boolean isServer) |
Http2StreamFrameToHttpObjectCodec(boolean isServer,
boolean validateHeaders) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptInboundMessage(Object msg) |
protected void |
decode(io.netty.channel.ChannelHandlerContext ctx,
Http2StreamFrame frame,
List<Object> out) |
protected void |
encode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpObject obj,
List<Object> out) |
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
protected boolean |
isSsl(io.netty.channel.ChannelHandlerContext ctx) |
acceptOutboundMessage, channelRead, write
bind, close, connect, deregister, disconnect, flush, read
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
ensureNotSharable, handlerRemoved, isSharable
public Http2StreamFrameToHttpObjectCodec(boolean isServer, boolean validateHeaders)
public Http2StreamFrameToHttpObjectCodec(boolean isServer)
public boolean acceptInboundMessage(Object msg) throws Exception
acceptInboundMessage
in class io.netty.handler.codec.MessageToMessageCodec<Http2StreamFrame,io.netty.handler.codec.http.HttpObject>
Exception
protected void decode(io.netty.channel.ChannelHandlerContext ctx, Http2StreamFrame frame, List<Object> out) throws Exception
decode
in class io.netty.handler.codec.MessageToMessageCodec<Http2StreamFrame,io.netty.handler.codec.http.HttpObject>
Exception
protected void encode(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpObject obj, List<Object> out) throws Exception
encode
in class io.netty.handler.codec.MessageToMessageCodec<Http2StreamFrame,io.netty.handler.codec.http.HttpObject>
Exception
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx) throws Exception
handlerAdded
in interface io.netty.channel.ChannelHandler
handlerAdded
in class io.netty.channel.ChannelHandlerAdapter
Exception
protected boolean isSsl(io.netty.channel.ChannelHandlerContext ctx)
Copyright © 2008–2017 The Netty Project. All rights reserved.