Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rice.pastry.messaging
Class PJavaSerializedDeserializer

    java.lang.Object
      rice.pastry.messaging.JavaSerializedDeserializer
          rice.pastry.messaging.PJavaSerializedDeserializer

All Implemented Interfaces:
  MessageDeserializer

Direct Known Subclasses:
  PeriodicLeafSetProtocol.PLSPMessageDeserializer, StandardJoinProtocol.SJPDeserializer

    public abstract class PJavaSerializedDeserializer

extends JavaSerializedDeserializer

The purpose of this class is just for programming convienience to disambiguate between rice.p2p.commonapi and rice.pastry with the interfaces/classes Message NodeHandle

Author:
  Jeff Hoye

Field Summary

Fields inherited from class rice.pastry.messaging.JavaSerializedDeserializer
`pn`

Constructor Summary
`PJavaSerializedDeserializer(PastryNode pn)`

Method Summary
`abstract Message` | `deserialize(InputBuffer buf, short type, int priority, NodeHandle sender)`
`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 rice.pastry.messaging.JavaSerializedDeserializer
`setAlwaysUseJavaSerialization`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PJavaSerializedDeserializer

    public PJavaSerializedDeserializer(PastryNode pn)

Method Detail

### deserialize

    public abstract Message deserialize(InputBuffer buf,
                                        short type,
                                        int priority,
                                        NodeHandle sender)
                                 throws java.io.IOException

  Throws:
    `java.io.IOException`

### 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`
  Overrides:
    `deserialize` in class `JavaSerializedDeserializer`
  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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.