Rice Pastry API

rice.tutorial.rawserialization
Class MyMsg

java.lang.Object
  extended by rice.tutorial.rawserialization.MyMsg
All Implemented Interfaces:
java.io.Serializable, Message, RawMessage, RawSerializable

public class MyMsg
extends java.lang.Object
implements RawMessage

An example message.

Author:
Jeff Hoye
See Also:
Serialized Form

Field Summary
protected static short TYPE
           
 
Fields inherited from interface rice.p2p.commonapi.Message
DEFAULT_PRIORITY, HIGH_PRIORITY, LOW_PRIORITY, LOWEST_PRIORITY, MAX_PRIORITY, MEDIUM_HIGH_PRIORITY, MEDIUM_LOW_PRIORITY, MEDIUM_PRIORITY
 
Constructor Summary
MyMsg(Id from, Id to)
          Constructor.
MyMsg(InputBuffer buf, Endpoint endpoint)
          Deserializing constructor.
 
Method Summary
 int getPriority()
          Use low priority to prevent interference with overlay maintenance traffic.
 short getType()
           
 void serialize(OutputBuffer buf)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

protected static final short TYPE
See Also:
Constant Field Values
Constructor Detail

MyMsg

public MyMsg(Id from,
             Id to)
Constructor.


MyMsg

public MyMsg(InputBuffer buf,
             Endpoint endpoint)
      throws java.io.IOException
Deserializing constructor. This does the "real" deserialization.

Parameters:
buf -
endpoint -
Throws:
java.io.IOException
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getPriority

public int getPriority()
Use low priority to prevent interference with overlay maintenance traffic.

Specified by:
getPriority in interface Message
Returns:
This message's priority

getType

public short getType()
Specified by:
getType in interface RawMessage

serialize

public void serialize(OutputBuffer buf)
               throws java.io.IOException
Specified by:
serialize in interface RawSerializable
Throws:
java.io.IOException

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection