@ChannelHandler.Sharable
public class ClientEntityStreamHandler
extends io.netty.channel.ChannelDuplexHandler
ChannelDuplexHandler that is responsible for sending StreamRequest,
receiving StreamResponseBuilder and response entity in the form of ByteStrings.
This handler also integrates with R2 entity streaming with the help of StreamReader and
StreamWriter.
The implementation guarantees the user Callback is invoked at most once
upon receiving response headers, exception, or channel inactive events. Together with timeout
ScheduledFuture, the implementation can also guarantee the callback is invoked eventually.| Constructor and Description |
|---|
ClientEntityStreamHandler(long maxContentLength) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Throwable cause) |
void |
write(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
io.netty.channel.ChannelPromise promise) |
bind, close, connect, deregister, disconnect, flush, readchannelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharablepublic ClientEntityStreamHandler(long maxContentLength)
public void write(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
io.netty.channel.ChannelPromise promise)
write in interface io.netty.channel.ChannelOutboundHandlerwrite in class io.netty.channel.ChannelDuplexHandlerpublic void channelRead(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg)
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdapterpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Throwable cause)
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapter