rice.p2p.util.rawserialization
Class JavaSerializedMessage
java.lang.Object
rice.p2p.util.rawserialization.JavaSerializedMessage
- All Implemented Interfaces:
- java.io.Serializable, Message, RawMessage
public class JavaSerializedMessage
- extends java.lang.Object
- implements RawMessage
Wrapper that converts rice.pastry.messaging.Message to rice.pastry.messageing.PRawMessage
- Author:
- Jeff Hoye
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
JavaSerializedMessage
public JavaSerializedMessage(Message msg)
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
getMessage
public Message getMessage()
getPriority
public int getPriority()
- Description copied from interface:
Message
- Method which should return the priority level of this message. The messages
can range in priority from -15 (highest priority) to 15 (lowest) -
when sending messages across the wire, the queue is sorted by message priority.
If the queue reaches its limit, the lowest priority messages are discarded. Thus,
applications which are very verbose should have LOW_PRIORITY or lower, and
applications which are somewhat quiet are allowed to have MEDIUM_PRIORITY or
possibly even HIGH_PRIORITY.
- Specified by:
getPriority
in interface Message
- Returns:
- This message's priority
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2001-2005 - Rice Pastry.