public class HttpClientUpgradeHandler extends HttpObjectAggregator
| Modifier and Type | Class and Description |
|---|---|
static interface |
HttpClientUpgradeHandler.SourceCodec
The source codec that is used in the pipeline initially.
|
static interface |
HttpClientUpgradeHandler.UpgradeCodec
A codec that the source can be upgraded to.
|
static class |
HttpClientUpgradeHandler.UpgradeEvent
User events that are fired to notify about upgrade status.
|
ChannelHandler.Sharable, ChannelHandler.Skip| Constructor and Description |
|---|
HttpClientUpgradeHandler(HttpClientUpgradeHandler.SourceCodec sourceCodec,
HttpClientUpgradeHandler.UpgradeCodec upgradeCodec,
int maxContentLength)
Constructs the client upgrade handler.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
decode(ChannelHandlerContext ctx,
HttpObject msg,
List<Object> out)
Decode from one message to an other.
|
void |
write(ChannelHandlerContext ctx,
Object msg,
ChannelPromise promise)
Calls
ChannelHandlerContext.write(Object) to forward
to the next ChannelHandler in the ChannelPipeline. |
aggregate, beginAggregation, contentLength, finishAggregation, handleOversizedMessage, hasContentLength, isAggregated, isContentMessage, isLastContentMessage, isStartMessage, newContinueResponseacceptInboundMessage, channelInactive, ctx, handlerAdded, handlerRemoved, isHandlingOversizedMessage, maxContentLength, maxCumulationBufferComponents, setMaxCumulationBufferComponentschannelReadbind, channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, close, connect, deregister, disconnect, exceptionCaught, flush, isSharable, read, userEventTriggeredpublic HttpClientUpgradeHandler(HttpClientUpgradeHandler.SourceCodec sourceCodec, HttpClientUpgradeHandler.UpgradeCodec upgradeCodec, int maxContentLength)
sourceCodec - the codec that is being used initially.upgradeCodec - the codec that the client would like to upgrade to.maxContentLength - the maximum length of the aggregated content.public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception
ChannelHandlerAdapterChannelHandlerContext.write(Object) to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.write in interface ChannelHandlerwrite in class ChannelHandlerAdapterctx - the ChannelHandlerContext for which the write operation is mademsg - the message to writepromise - the ChannelPromise to notify once the operation completesException - thrown if an error accourprotected void decode(ChannelHandlerContext ctx, HttpObject msg, List<Object> out) throws Exception
MessageToMessageDecoderdecode in class MessageAggregator<HttpObject,HttpMessage,HttpContent,FullHttpMessage>ctx - the ChannelHandlerContext which this MessageToMessageDecoder belongs tomsg - the message to decode to an other oneout - the List to which decoded messages should be addedException - is thrown if an error accourCopyright © 2008–2015 The Netty Project. All rights reserved.