org.littleshoot.util.mina
Class DecodingStateMachine

java.lang.Object
  extended by org.littleshoot.util.mina.DecodingStateMachine
All Implemented Interfaces:
DecodingState

public abstract class DecodingStateMachine
extends Object
implements DecodingState

Taken from AsyncWeb. This is a decoding state that is itself a state machine.


Constructor Summary
DecodingStateMachine()
           
 
Method Summary
 DecodingState decode(org.littleshoot.mina.common.ByteBuffer in, org.littleshoot.mina.filter.codec.ProtocolDecoderOutput out)
          Decodes the input for this state.
protected abstract  void destroy()
           
protected abstract  DecodingState finishDecode(List<Object> childProducts, org.littleshoot.mina.filter.codec.ProtocolDecoderOutput out)
           
protected abstract  DecodingState init()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecodingStateMachine

public DecodingStateMachine()
Method Detail

init

protected abstract DecodingState init()
                               throws Exception
Throws:
Exception

finishDecode

protected abstract DecodingState finishDecode(List<Object> childProducts,
                                              org.littleshoot.mina.filter.codec.ProtocolDecoderOutput out)
                                       throws Exception
Throws:
Exception

destroy

protected abstract void destroy()
                         throws Exception
Throws:
Exception

decode

public DecodingState decode(org.littleshoot.mina.common.ByteBuffer in,
                            org.littleshoot.mina.filter.codec.ProtocolDecoderOutput out)
                     throws Exception
Description copied from interface: DecodingState
Decodes the input for this state.

Specified by:
decode in interface DecodingState
Parameters:
in - The read data.
out - The output to write to.
Returns:
The next decoding state.
Throws:
Exception - If any error occurs.


Copyright © 2013 LittleShoot. All Rights Reserved.