org.apache.mina.example.sumup.codec
Class AddMessageDecoder
java.lang.Object
org.apache.mina.example.sumup.codec.AbstractMessageDecoder
org.apache.mina.example.sumup.codec.AddMessageDecoder
- All Implemented Interfaces:
- MessageDecoder
public class AddMessageDecoder
- extends AbstractMessageDecoder
A MessageDecoder
that decodes AddMessage
.
- Author:
- Apache MINA Project
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AddMessageDecoder
public AddMessageDecoder()
decodeBody
protected AbstractMessage decodeBody(IoSession session,
IoBuffer in)
- Specified by:
decodeBody
in class AbstractMessageDecoder
- Returns:
- null if the whole body is not read yet
finishDecode
public void finishDecode(IoSession session,
ProtocolDecoderOutput out)
throws Exception
- Description copied from interface:
MessageDecoder
- Invoked when the specified session is closed while this decoder was
parsing the data. 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
MessageDecoder.decode(IoSession, IoBuffer, ProtocolDecoderOutput)
method didn't process
completely.
- Throws:
Exception
- if the read data violated protocol specification
Copyright © 2004-2011 Apache MINA Project. All Rights Reserved.