rice.p2p.glacier.v2.messaging
Class GlacierMessage
java.lang.Object
rice.p2p.glacier.v2.messaging.GlacierMessage
- All Implemented Interfaces:
- java.io.Serializable, Message, RawMessage
- Direct Known Subclasses:
- GlacierDataMessage, GlacierFetchMessage, GlacierNeighborRequestMessage, GlacierNeighborResponseMessage, GlacierQueryMessage, GlacierRangeForwardMessage, GlacierRangeQueryMessage, GlacierRangeResponseMessage, GlacierRefreshCompleteMessage, GlacierRefreshPatchMessage, GlacierRefreshProbeMessage, GlacierRefreshResponseMessage, GlacierResponseMessage, GlacierSyncMessage, GlacierTimeoutMessage
public abstract class GlacierMessage
- extends java.lang.Object
- implements RawMessage
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface rice.p2p.commonapi.rawserialization.RawMessage |
getType |
id
protected int id
tag
protected char tag
source
protected NodeHandle source
dest
protected Id dest
isResponse
protected boolean isResponse
GlacierMessage
protected GlacierMessage(int id,
NodeHandle source,
Id dest,
boolean isResponse,
char tag)
- Constructor which takes a unique integer Id
- Parameters:
id
- The unique idsource
- The source addressdest
- The destination address
GlacierMessage
public GlacierMessage(InputBuffer buf,
Endpoint endpoint)
throws java.io.IOException
- Throws:
java.io.IOException
getPriority
public int getPriority()
- Method which should return the priority level of this message. The messages
can range in priority from 0 (highest priority) to Integer.MAX_VALUE (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
getUID
public int getUID()
- Method which returns this messages' unique id
- Returns:
- The id of this message
getSource
public NodeHandle getSource()
- Method which returns this messages' source address
- Returns:
- The source of this message
getDestination
public Id getDestination()
- Method which returns this messages' destination address
- Returns:
- The dest of this message
isResponse
public boolean isResponse()
getTag
public char getTag()
serialize
public void serialize(OutputBuffer buf)
throws java.io.IOException
- Specified by:
serialize
in interface RawMessage
- Throws:
java.io.IOException
Copyright © 2001-2005 - Rice Pastry.