ch.mimo.netty.handler.codec.icap
Class IcapMessageDecoder
java.lang.Object
org.jboss.netty.channel.SimpleChannelUpstreamHandler
org.jboss.netty.handler.codec.replay.ReplayingDecoder<StateEnum>
ch.mimo.netty.handler.codec.icap.IcapMessageDecoder
- All Implemented Interfaces:
- org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler
- Direct Known Subclasses:
- IcapRequestDecoder, IcapResponseDecoder
public abstract class IcapMessageDecoder
- extends org.jboss.netty.handler.codec.replay.ReplayingDecoder<StateEnum>
Main ICAP message decoder implementation. this decoder is bases on a @see ReplayingDecoder
Due to the complexity of an ICAP message the decoder was implement with individual states that reside
in their own classes.
For a full list of states that are used within this decoder: @see StateEnum
- Author:
- Michael Mimo Moratti (mimo@mimo.ch)
- See Also:
IcapRequestDecoder
,
IcapResponseDecoder
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler |
org.jboss.netty.channel.ChannelHandler.Sharable |
Constructor Summary |
protected |
IcapMessageDecoder()
Creates a new instance with the default
maxInitialLineLength (4096 }, maxIcapHeaderSize (8192) , maxHttpHeaderSize (8192) , and
maxChunkSize (8192) . |
protected |
IcapMessageDecoder(int maxInitialLineLength,
int maxIcapHeaderSize,
int maxHttpHeaderSize,
int maxChunkSize)
Creates a new instance with the specified parameters. |
Methods inherited from class org.jboss.netty.handler.codec.replay.ReplayingDecoder |
actualReadableBytes, channelClosed, channelDisconnected, checkpoint, checkpoint, decodeLast, exceptionCaught, getState, internalBuffer, messageReceived, setState |
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler |
channelBound, channelConnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
maxInitialLineLength
protected final int maxInitialLineLength
maxIcapHeaderSize
protected final int maxIcapHeaderSize
maxHttpHeaderSize
protected final int maxHttpHeaderSize
maxChunkSize
protected final int maxChunkSize
message
protected IcapMessage message
currentChunkSize
protected int currentChunkSize
IcapMessageDecoder
protected IcapMessageDecoder()
- Creates a new instance with the default
maxInitialLineLength (4096
}, maxIcapHeaderSize (8192)
, maxHttpHeaderSize (8192)
, and
maxChunkSize (8192)
.
IcapMessageDecoder
protected IcapMessageDecoder(int maxInitialLineLength,
int maxIcapHeaderSize,
int maxHttpHeaderSize,
int maxChunkSize)
- Creates a new instance with the specified parameters.
- Parameters:
maxInitialLineLength
- maxIcapHeaderSize
- maxHttpHeaderSize
- maxChunkSize
-
decode
protected Object decode(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.Channel channel,
org.jboss.netty.buffer.ChannelBuffer buffer,
StateEnum stateEnumValue)
throws Exception
- Specified by:
decode
in class org.jboss.netty.handler.codec.replay.ReplayingDecoder<StateEnum>
- Throws:
Exception
isDecodingResponse
public abstract boolean isDecodingResponse()
createMessage
protected abstract IcapMessage createMessage(String[] initialLine)
Copyright © 2011. All Rights Reserved.