ePOST API

rice.post.messaging
Class PostPastryMessage

java.lang.Object
  extended by rice.post.messaging.PostPastryMessage
All Implemented Interfaces:
java.io.Serializable, Message, SignedPostMessageWrapper

public class PostPastryMessage
extends java.lang.Object
implements Message, SignedPostMessageWrapper

This is a wrapper message for all Post messages which are to be sent over the Pastry messaging system.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface rice.p2p.commonapi.Message
HIGH_PRIORITY, LOW_PRIORITY, MEDIUM_HIGH_PRIORITY, MEDIUM_LOW_PRIORITY, MEDIUM_PRIORITY
 
Constructor Summary
PostPastryMessage(SignedPostMessage message)
          Builds a PostPastryMessage given a PostMessage.
 
Method Summary
 SignedPostMessage getMessage()
          Returns the internal SignedPostMessage.
 int getPriority()
          Method which should return the priority level of this message.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PostPastryMessage

public PostPastryMessage(SignedPostMessage message)
Builds a PostPastryMessage given a PostMessage.

Parameters:
message - The internal message.
Method Detail

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

getMessage

public SignedPostMessage getMessage()
Returns the internal SignedPostMessage.

Specified by:
getMessage in interface SignedPostMessageWrapper
Returns:
The contained SignedPostMessage.

toString

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

ePOST API

Copyright © 2001-2005 - Rice Pastry.