Rice Pastry API

rice.p2p.util.rawserialization
Class JavaSerializedDeserializer

java.lang.Object
  extended by rice.p2p.util.rawserialization.JavaSerializedDeserializer
All Implemented Interfaces:
MessageDeserializer

public class JavaSerializedDeserializer
extends java.lang.Object
implements MessageDeserializer

Handles "old" java serialized messages for programming convienience and reverse compatability.

Author:
Jeff Hoye

Field Summary
protected  Endpoint endpoint
           
 
Constructor Summary
JavaSerializedDeserializer(Endpoint endpoint)
           
 
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); }
 void setAlwaysUseJavaSerialization(boolean val)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

endpoint

protected Endpoint endpoint
Constructor Detail

JavaSerializedDeserializer

public JavaSerializedDeserializer(Endpoint endpoint)
Method Detail

setAlwaysUseJavaSerialization

public void setAlwaysUseJavaSerialization(boolean val)

deserialize

public Message deserialize(InputBuffer buf,
                           short type,
                           int priority,
                           NodeHandle sender)
                    throws java.io.IOException
Description copied from interface: MessageDeserializer
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
Throws:
java.io.IOException

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection