Rice Pastry API

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); }
 

Method Detail

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 PARAMETER
type - DESCRIBE THE PARAMETER
priority - DESCRIBE THE PARAMETER
sender - DESCRIBE THE PARAMETER
Returns:
DESCRIBE THE RETURN VALUE
Throws:
java.io.IOException - DESCRIBE THE EXCEPTION

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection