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.multiring.messaging
Class RingMessage

    java.lang.Object
      rice.p2p.multiring.messaging.RingMessage

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

public class RingMessage
extends java.lang.Object
implements Message, ScribeContent

Version:
  $Id: RingMessage.java 2302 2005-03-11 00:58:26Z jeffh $
Author:
  Alan Mislove
See Also:
  Serialized Form

Field Summary
`protected java.lang.String` | `application` The name of the application which sent this message
`protected RingId` | `id` The target of this ring message
`protected Message` | `message` The internal message to be sent

Fields inherited from interface rice.p2p.commonapi.Message
`HIGH_PRIORITY, LOW_PRIORITY, MEDIUM_HIGH_PRIORITY, MEDIUM_LOW_PRIORITY, MEDIUM_PRIORITY`

Constructor Summary
`RingMessage(RingId id, Message message, java.lang.String application)` Constructor which takes a unique integer Id

Method Summary
`java.lang.String` | `getApplication()` Method which returns this messages' applicaiton name
`RingId` | `getId()` Method which returns this messages' id
`Message` | `getMessage()` Method which returns this messages' internal message
`int` | `getPriority()` Method which should return the priority level of this message.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### id

    protected RingId id

  The target of this ring message

### message

    protected Message message

  The internal message to be sent

### application

    protected java.lang.String application

  The name of the application which sent this message

Constructor Detail

### RingMessage

    public RingMessage(RingId id,
                       Message message,
                       java.lang.String application)

  Constructor which takes a unique integer Id

Parameters:
  `id` - The unique id
  `message` - DESCRIBE THE PARAMETER
  `application` - DESCRIBE THE PARAMETER

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

### getId

    public RingId getId()

  Method which returns this messages' id

  Returns:
    The id of this message

### getMessage

    public Message getMessage()

  Method which returns this messages' internal message

  Returns:
    The internal message of this message

### getApplication

    public java.lang.String getApplication()

  Method which returns this messages' applicaiton name

  Returns:
    The application name of this message

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.