ca.mcgill.cs.postina.scribe
Class ScribeRequestMessage

java.lang.Object
  extended by ca.mcgill.cs.postina.scribe.ScribeRequestMessage
All Implemented Interfaces:
java.io.Serializable, rice.p2p.commonapi.Message, rice.p2p.scribe.ScribeContent
Direct Known Subclasses:
SubscribeRequest, UnsubscribeRequest

public abstract class ScribeRequestMessage
extends java.lang.Object
implements rice.p2p.scribe.ScribeContent, rice.p2p.commonapi.Message

A ScribeRequestMessage is a special message that is sent to a client in the network to ask it to perform a certain action. Currently it is used for subscriptions and unsubscriptions.

Version:
Oct 23, 2007
Author:
Dominik Zindel
See Also:
Serialized Form

Field Summary
private  PostinaScribeTransportMessage content
          The message that can be sent together with a subscription or unsubscription.
private static long serialVersionUID
           
private  java.util.Collection<rice.p2p.scribe.Topic> topics
          The collection of Topics which should be used by the client when taking the required action.
 
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
protected ScribeRequestMessage(java.util.Collection<rice.p2p.scribe.Topic> topics, PostinaScribeTransportMessage content)
          The constructor for a ScribeRequestMessage.
 
Method Summary
protected  PostinaScribeTransportMessage getContent()
          This method gets the message that is sent together with a subscription or unsubscription.
 int getPriority()
           
protected  java.util.Collection<rice.p2p.scribe.Topic> getTopics()
          This method gets the collection of topics that are necessary for the subscription or unsubscription.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

content

private final PostinaScribeTransportMessage content
The message that can be sent together with a subscription or unsubscription.


topics

private final java.util.Collection<rice.p2p.scribe.Topic> topics
The collection of Topics which should be used by the client when taking the required action.

Constructor Detail

ScribeRequestMessage

protected ScribeRequestMessage(java.util.Collection<rice.p2p.scribe.Topic> topics,
                               PostinaScribeTransportMessage content)
The constructor for a ScribeRequestMessage.

Parameters:
topics - The collection of Topics which have to be used for the action.
content - The message that is sent together with a subscription or unsubscription.
Method Detail

getContent

protected PostinaScribeTransportMessage getContent()
This method gets the message that is sent together with a subscription or unsubscription.

Returns:
The PostinaScribeTransportMessage that is sent together with a subscription/unsubscription.

getPriority

public int getPriority()
Specified by:
getPriority in interface rice.p2p.commonapi.Message

getTopics

protected java.util.Collection<rice.p2p.scribe.Topic> getTopics()
This method gets the collection of topics that are necessary for the subscription or unsubscription.

Returns:
The collection of Topics that are part of this ScribeRequestMessage