Rice Pastry API

rice.p2p.commonapi.rawserialization
Interface MessageDeserializer

All Known Implementing Classes:
GCPastImpl.GCPastDeserializer, JavaSerializedDeserializer, JavaSerializedDeserializer, PastImpl.PastDeserializer, PeriodicLeafSetProtocol.PLSPMessageDeserializer, PJavaSerializedDeserializer

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


Method Summary
 Message deserialize(InputBuffer buf, short type, int 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

Message deserialize(InputBuffer buf,
                    short type,
                    int 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); }

Throws:
java.io.IOException

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection