org.apache.mina.filter.codec.statemachine
Class DecodingStateProtocolDecoder
java.lang.Object
org.apache.mina.filter.codec.statemachine.DecodingStateProtocolDecoder
- All Implemented Interfaces:
- ProtocolDecoder
public class DecodingStateProtocolDecoder
- extends Object
- implements ProtocolDecoder
- Version:
- $Rev: 602854 $, $Date: 2007-12-10 11:43:18 +0100 (Mon, 10 Dec 2007) $
- Author:
- The Apache MINA Project (dev@mina.apache.org)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DecodingStateProtocolDecoder
public DecodingStateProtocolDecoder(DecodingState state)
decode
public void decode(IoSession session,
IoBuffer in,
ProtocolDecoderOutput out)
throws Exception
- Description copied from interface:
ProtocolDecoder
- Decodes binary or protocol-specific content into higher-level message objects.
MINA invokes
ProtocolDecoder.decode(IoSession, IoBuffer, ProtocolDecoderOutput)
method with read data, and then the decoder implementation puts decoded
messages into ProtocolDecoderOutput
.
- Specified by:
decode
in interface ProtocolDecoder
- Throws:
Exception
- if the read data violated protocol specification
finishDecode
public void finishDecode(IoSession session,
ProtocolDecoderOutput out)
throws Exception
- Description copied from interface:
ProtocolDecoder
- Invoked when the specified session is closed. This method is useful
when you deal with the protocol which doesn't specify the length of a message
such as HTTP response without content-length header. Implement this
method to process the remaining data that
ProtocolDecoder.decode(IoSession, IoBuffer, ProtocolDecoderOutput)
method didn't process completely.
- Specified by:
finishDecode
in interface ProtocolDecoder
- Throws:
Exception
- if the read data violated protocol specification
dispose
public void dispose(IoSession session)
throws Exception
- Description copied from interface:
ProtocolDecoder
- Releases all resources related with this decoder.
- Specified by:
dispose
in interface ProtocolDecoder
- Throws:
Exception
- if failed to dispose all resources
Copyright © 2004-2009 Apache MINA Project. All Rights Reserved.