org.apache.mina.filter.codec.statemachine
Class ConsumeToDynamicTerminatorDecodingState

java.lang.Object
  extended by org.apache.mina.filter.codec.statemachine.ConsumeToDynamicTerminatorDecodingState
All Implemented Interfaces:
DecodingState
Direct Known Subclasses:
ConsumeToLinearWhitespaceDecodingState

public abstract class ConsumeToDynamicTerminatorDecodingState
extends Object
implements DecodingState

Consumes until a fixed (ASCII) character is reached. The terminator is skipped.

Version:
$Rev: 601994 $, $Date: 2007-12-07 05:58:00 +0100 (Fri, 07 Dec 2007) $
Author:
The Apache MINA Project (dev@mina.apache.org)

Constructor Summary
ConsumeToDynamicTerminatorDecodingState()
          Creates a new instance.
 
Method Summary
 DecodingState decode(IoBuffer in, ProtocolDecoderOutput out)
          Invoked when data is available for this state.
protected abstract  DecodingState finishDecode(IoBuffer product, ProtocolDecoderOutput out)
           
 DecodingState finishDecode(ProtocolDecoderOutput out)
          Invoked when the associated IoSession is closed.
protected abstract  boolean isTerminator(byte b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsumeToDynamicTerminatorDecodingState

public ConsumeToDynamicTerminatorDecodingState()
Creates a new instance.

Method Detail

decode

public DecodingState decode(IoBuffer in,
                            ProtocolDecoderOutput out)
                     throws Exception
Description copied from interface: DecodingState
Invoked when data is available for this state.

Specified by:
decode in interface DecodingState
Throws:
Exception

finishDecode

public DecodingState finishDecode(ProtocolDecoderOutput out)
                           throws Exception
Description copied from interface: DecodingState
Invoked when the associated IoSession is closed.

Specified by:
finishDecode in interface DecodingState
Throws:
Exception

isTerminator

protected abstract boolean isTerminator(byte b)

finishDecode

protected abstract DecodingState finishDecode(IoBuffer product,
                                              ProtocolDecoderOutput out)
                                       throws Exception
Throws:
Exception


Copyright © 2004-2009 Apache MINA Project. All Rights Reserved.