Rice Pastry API

rice.p2p.scribe.messaging
Class PublishRequestMessage

java.lang.Object
  extended by rice.p2p.scribe.messaging.ScribeMessage
      extended by rice.p2p.scribe.messaging.PublishRequestMessage
All Implemented Interfaces:
java.io.Serializable, Message, RawMessage, RawSerializable

public class PublishRequestMessage
extends ScribeMessage

Version:
$Id: PublishRequestMessage.java 3850 2007-09-10 15:53:23Z jeffh $
Author:
Alan Mislove
See Also:
Serialized Form

Field Summary
protected  RawScribeContent content
           
static short TYPE
           
 
Fields inherited from class rice.p2p.scribe.messaging.ScribeMessage
source, topic
 
Fields inherited from interface rice.p2p.commonapi.Message
DEFAULT_PRIORITY, HIGH_PRIORITY, LOW_PRIORITY, LOWEST_PRIORITY, MAX_PRIORITY, MEDIUM_HIGH_PRIORITY, MEDIUM_LOW_PRIORITY, MEDIUM_PRIORITY
 
Constructor Summary
PublishRequestMessage(NodeHandle source, Topic topic, RawScribeContent content)
           
PublishRequestMessage(NodeHandle source, Topic topic, ScribeContent content)
          Constructor which takes a unique integer Id
 
Method Summary
static PublishRequestMessage build(InputBuffer buf, Endpoint endpoint, ScribeContentDeserializer scd)
           
 ScribeContent getContent()
          Returns the content
 int getPriority()
          Method which should return the priority level of this message.
 short getType()
          Raw Serialization
 void serialize(OutputBuffer buf)
           
 java.lang.String toString()
           
 
Methods inherited from class rice.p2p.scribe.messaging.ScribeMessage
getSource, getTopic, setSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static final short TYPE
See Also:
Constant Field Values

content

protected RawScribeContent content
Constructor Detail

PublishRequestMessage

public PublishRequestMessage(NodeHandle source,
                             Topic topic,
                             ScribeContent content)
Constructor which takes a unique integer Id

Parameters:
id - The unique id
source - The source address
dest - The destination address

PublishRequestMessage

public PublishRequestMessage(NodeHandle source,
                             Topic topic,
                             RawScribeContent content)
Method Detail

getContent

public ScribeContent getContent()
Returns the content

Returns:
The content

toString

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

getPriority

public int getPriority()
Description copied from class: ScribeMessage
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
Overrides:
getPriority in class ScribeMessage
Returns:
This message's priority

getType

public short getType()
Raw Serialization


serialize

public void serialize(OutputBuffer buf)
               throws java.io.IOException
Specified by:
serialize in interface RawSerializable
Overrides:
serialize in class ScribeMessage
Throws:
java.io.IOException

build

public static PublishRequestMessage build(InputBuffer buf,
                                          Endpoint endpoint,
                                          ScribeContentDeserializer scd)
                                   throws java.io.IOException
Throws:
java.io.IOException

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection