Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rice.p2p.scribe.messaging
Class ScribeMessage

    java.lang.Object
      rice.p2p.scribe.messaging.ScribeMessage

All Implemented Interfaces:
  java.io.Serializable, Message, RawMessage

Direct Known Subclasses:
  AbstractSubscribeMessage, AnycastMessage, DropMessage, MaintenanceMessage, PublishMessage, PublishRequestMessage, UnsubscribeMessage

    public abstract class ScribeMessage

extends java.lang.Object
implements RawMessage

Version:
  $Id: ScribeMessage.java 3305 2006-06-22 10:01:58Z jeffh $
Author:
  Alan Mislove
See Also:
  Serialized Form

Field Summary
`protected NodeHandle` | `source` DESCRIBE THE FIELD
`protected Topic` | `topic` 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
`protected` | `ScribeMessage(InputBuffer buf, Endpoint endpoint)` Protected because it should only be called from an extending class, to get version numbers correct.
`protected` | `ScribeMessage(NodeHandle source, Topic topic)` Constructor which takes a unique integer Id

Method Summary
`byte` | `getPriority()` Method which should return the priority level of this message.
`NodeHandle` | `getSource()` Method which returns this messages' source address
`Topic` | `getTopic()` Method which returns this messages' topic
`void` | `serialize(OutputBuffer buf)` DESCRIBE THE METHOD
`void` | `setSource(NodeHandle source)` Method which set this messages' source address

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`

Field Detail

### source

    protected NodeHandle source

  DESCRIBE THE FIELD

### topic

    protected Topic topic

  DESCRIBE THE FIELD

Constructor Detail

### ScribeMessage

    protected ScribeMessage(NodeHandle source,
                            Topic topic)

  Constructor which takes a unique integer Id

  Parameters:
    `source` - The source address
    `topic` - The topic

### ScribeMessage

    protected ScribeMessage(InputBuffer buf,
                            Endpoint endpoint)
                     throws java.io.IOException

  Protected because it should only be called from an extending class, to get version numbers correct.

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

Method Detail

### getPriority

    public byte 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

### getSource

    public NodeHandle getSource()

  Method which returns this messages' source address

  Returns:
    The source of this message

### getTopic

    public Topic getTopic()

  Method which returns this messages' topic

  Returns:
    The topic of this message

### setSource

    public void setSource(NodeHandle source)

  Method which set this messages' source address

  Parameters:
    `source` - The source of this message

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.