Rice Pastry API

rice.tutorial.rawserialization
Class MyMsg

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

public class MyMsg
extends java.lang.Object
implements RawMessage

An example message.

Version:
$Id: pretty.settings 2305 2005-03-11 20:22:33Z jeffh $
Author:
Jeff Hoye
See Also:
Serialized Form

Field Summary
protected static short TYPE
          DESCRIBE THE FIELD
 
Fields inherited from interface rice.p2p.commonapi.Message
HIGH_PRIORITY, LOW_PRIORITY, MAX_PRIORITY, MEDIUM_HIGH_PRIORITY, MEDIUM_LOW_PRIORITY, MEDIUM_PRIORITY
 
Constructor Summary
MyMsg(Id from, Id to)
          Constructor.
MyMsg(InputBuffer buf, Endpoint endpoint)
          Constructor for MyMsg.
 
Method Summary
 byte getPriority()
          Use low priority to prevent interference with overlay maintenance traffic.
 short getType()
          Gets the Type attribute of the MyMsg object
 void serialize(OutputBuffer buf)
          DESCRIBE THE METHOD
 java.lang.String toString()
          DESCRIBE THE METHOD
 
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
DESCRIBE THE FIELD

See Also:
Constant Field Values
Constructor Detail

MyMsg

public MyMsg(Id from,
             Id to)
Constructor.

Parameters:
from - DESCRIBE THE PARAMETER
to - DESCRIBE THE PARAMETER

MyMsg

public MyMsg(InputBuffer buf,
             Endpoint endpoint)
      throws java.io.IOException
Constructor for MyMsg.

Parameters:
buf - DESCRIBE THE PARAMETER
endpoint - DESCRIBE THE PARAMETER
Throws:
java.io.IOException - DESCRIBE THE EXCEPTION
Method Detail

getPriority

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

Specified by:
getPriority in interface Message
Returns:
The Priority value

getType

public short getType()
Gets the Type attribute of the MyMsg object

Specified by:
getType in interface RawMessage
Returns:
The Type value

toString

public java.lang.String toString()
DESCRIBE THE METHOD

Returns:
DESCRIBE THE RETURN VALUE

serialize

public void serialize(OutputBuffer buf)
               throws java.io.IOException
DESCRIBE THE METHOD

Specified by:
serialize in interface RawMessage
Parameters:
buf - DESCRIBE THE PARAMETER
Throws:
java.io.IOException - DESCRIBE THE EXCEPTION

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection