@UnstableApi public class Http2ServerDowngrader extends io.netty.handler.codec.MessageToMessageCodec<Http2StreamFrame,io.netty.handler.codec.http.HttpObject>
Http2StreamFrame
to HttpObject
, and back. For simplicity, it converts to chunked encoding
unless the entire stream is a single header.Constructor and Description |
---|
Http2ServerDowngrader() |
Http2ServerDowngrader(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) |
acceptOutboundMessage, channelRead, write
bind, close, connect, deregister, disconnect, flush, read
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
public Http2ServerDowngrader(boolean validateHeaders)
public Http2ServerDowngrader()
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
Copyright © 2008–2017 The Netty Project. All rights reserved.