rice.p2p.commonapi.rawserialization
Interface MessageDeserializer
- All Known Implementing Classes:
- JavaSerializedDeserializer, JavaSerializedDeserializer, PastImpl.PastDeserializer
- public interface MessageDeserializer
Because Pastry/Transport layer cannot know about all messge types, each app
needs to provide a deserializer. Default, there is a Java Serializer
- Version:
- $Id: pretty.settings 2305 2005-03-11 20:22:33Z jeffh $
- Author:
- jeffh
Method Summary |
Message |
deserialize(InputBuffer buf,
short type,
byte priority,
NodeHandle sender)
RawMessage ret = super.deserialize(); if (ret != null) return ret; Endpoint
endpoint; switch(type) { case 1: return new MyMessage(buf, endpoint); } |
deserialize
public Message deserialize(InputBuffer buf,
short type,
byte priority,
NodeHandle sender)
throws java.io.IOException
- RawMessage ret = super.deserialize(); if (ret != null) return ret; Endpoint
endpoint; switch(type) { case 1: return new MyMessage(buf, endpoint); }
- Parameters:
buf
- DESCRIBE THE PARAMETERtype
- DESCRIBE THE PARAMETERpriority
- DESCRIBE THE PARAMETERsender
- DESCRIBE THE PARAMETER
- Returns:
- DESCRIBE THE RETURN VALUE
- Throws:
java.io.IOException
- DESCRIBE THE EXCEPTION
Copyright © 2001-2005 - Rice Pastry.