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

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
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)
           
 
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
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 RawMessage
Throws:
java.io.IOException

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection