Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 Class Summary

Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
`org.jboss.netty.channel.ChannelHandler.Sharable`

Field Summary
`protected int` | `currentChunkSize`
`protected int` | `maxChunkSize`
`protected int` | `maxHttpHeaderSize`
`protected int` | `maxIcapHeaderSize`
`protected int` | `maxInitialLineLength`
`protected IcapMessage` | `message`

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.

Method Summary
`protected abstract IcapMessage` | `createMessage(String[] initialLine)`
`protected Object` | `decode(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.Channel channel, org.jboss.netty.buffer.ChannelBuffer buffer, StateEnum stateEnumValue)`
`abstract boolean` | `isDecodingResponse()`

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`

Field Detail

### 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

Constructor Detail

### 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` -

Method Detail

### 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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011. All Rights Reserved.