ch.mimo.netty.handler.codec.icap
Class State<T>

java.lang.Object
  extended by ch.mimo.netty.handler.codec.icap.State<T>
Type Parameters:
T -
Direct Known Subclasses:
ReadChunkDelimiterState, ReadChunkedContentAsChunksState, ReadChunkSizeState, ReadChunkState, ReadHttpRequestInitialAndHeadersState, ReadHttpResponseInitalAndHeadersState, ReadIcapHeaderState, ReadIcapInitialState, ReadTrailingHeadersState, SkipControlCharsState

public abstract class State<T>
extends Object

Abstract state implementation for all Decoder states.

Author:
Michael Mimo Moratti (mimo@mimo.ch)
See Also:
IcapMessageDecoder, StateEnum

Constructor Summary
State(String name)
           
 
Method Summary
abstract  StateReturnValue execute(org.jboss.netty.buffer.ChannelBuffer buffer, IcapMessageDecoder icapMessageDecoder)
          execution method
abstract  void onEntry(org.jboss.netty.buffer.ChannelBuffer buffer, IcapMessageDecoder icapMessageDecoder)
          Preparation method
abstract  StateEnum onExit(org.jboss.netty.buffer.ChannelBuffer buffer, IcapMessageDecoder icapMessageDecoder, T decisionInformation)
          Flow decision method
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

State

public State(String name)
Method Detail

onEntry

public abstract void onEntry(org.jboss.netty.buffer.ChannelBuffer buffer,
                             IcapMessageDecoder icapMessageDecoder)
                      throws DecodingException
Preparation method

Throws:
DecodingException

execute

public abstract StateReturnValue execute(org.jboss.netty.buffer.ChannelBuffer buffer,
                                         IcapMessageDecoder icapMessageDecoder)
                                  throws DecodingException
execution method

Returns:
@see StateReturnValue that contains, dependent on the relevance a return value.
Throws:
DecodingException

onExit

public abstract StateEnum onExit(org.jboss.netty.buffer.ChannelBuffer buffer,
                                 IcapMessageDecoder icapMessageDecoder,
                                 T decisionInformation)
                          throws DecodingException
Flow decision method

Returns:
has to return a valid next state. Can be itself.
Throws:
DecodingException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.