net.sf.cindy
Interface PacketDecoder

All Known Implementing Classes:
BufferDecoder, ByteArrayDecoder, ByteBufferDecoder, PacketDecoderChain, SerialDecoder, SimplePacketDecoder

public interface PacketDecoder

Decode Packet to object.

Version:
$id$
Author:
Roger Chen

Method Summary
 java.lang.Object decode(Session session, Packet packet)
          Decode packet to object.
 

Method Detail

decode

java.lang.Object decode(Session session,
                        Packet packet)
                        throws java.lang.Exception
Decode packet to object. The content of the packet is readonly, and it's position will not be changed if the method return null.

Parameters:
session - session
packet - packet
Returns:
decoded object
Throws:
java.lang.Exception - any exception