Rice Pastry API

rice.p2p.past
Class PastImpl.PastDeserializer

java.lang.Object
  extended by rice.p2p.past.PastImpl.PastDeserializer
All Implemented Interfaces:
MessageDeserializer
Direct Known Subclasses:
GCPastImpl.GCPastDeserializer
Enclosing class:
PastImpl

protected class PastImpl.PastDeserializer
extends java.lang.Object
implements MessageDeserializer


Constructor Summary
protected PastImpl.PastDeserializer()
           
 
Method Summary
 Message deserialize(InputBuffer buf, short type, int priority, NodeHandle sender)
          Typical implementation: RawMessage ret = super.deserialize(); if (ret != null) return ret; Endpoint endpoint; switch(type) { case 1: return new MyMessage(buf, endpoint); }
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PastImpl.PastDeserializer

protected PastImpl.PastDeserializer()
Method Detail

deserialize

public Message deserialize(InputBuffer buf,
                           short type,
                           int priority,
                           NodeHandle sender)
                    throws java.io.IOException
Description copied from interface: MessageDeserializer
Typical implementation: RawMessage ret = super.deserialize(); if (ret != null) return ret; Endpoint endpoint; switch(type) { case 1: return new MyMessage(buf, endpoint); }

Specified by:
deserialize in interface MessageDeserializer
Parameters:
buf - accessor to the bytes
type - the message type, defined in RawMessage.getType()
priority - the priority of the message
sender - the sender of the Message (may be null if not specified).
Returns:
The deserialized message.
Throws:
java.io.IOException

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection