cgl.narada.transport.rtp
Class SessionTopicManager

java.lang.Object
  extended by cgl.narada.transport.rtp.SessionTopicManager

public class SessionTopicManager
extends Object


Constructor Summary
SessionTopicManager(int baseTopicNumber)
          If the number of streams is not given, then use 1000 as the default
SessionTopicManager(int baseTopicNumber, int sessionSize)
          construct an object of this class with the given parameters
 
Method Summary
 int addTopic()
          add a topic number to the session.
 boolean equals(Object obj)
          if baseTopicNumbers are equal, return true otherwise false
 int getMaxTopicNumber()
          return maxTopicNumber
 int getSessionID()
          return the sessionID which is the base topic number
 int getSessionSize()
          return maxTopicNumber
static void main(String[] args)
           
 void removeAll()
          deletes the given topic number return true if successful, false otherwise
 boolean removeTopic(int t)
          deletes the given topic number return true if successful, false otherwise
 String toString()
          toString method implementation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SessionTopicManager

public SessionTopicManager(int baseTopicNumber)
If the number of streams is not given, then use 1000 as the default


SessionTopicManager

public SessionTopicManager(int baseTopicNumber,
                           int sessionSize)
construct an object of this class with the given parameters

Method Detail

getSessionID

public int getSessionID()
return the sessionID which is the base topic number


getSessionSize

public int getSessionSize()
return maxTopicNumber


getMaxTopicNumber

public int getMaxTopicNumber()
return maxTopicNumber


addTopic

public int addTopic()
             throws Exception
add a topic number to the session. assigns the topic numbers in increasing order, until it reaches the maximum then it reassigns the deleted topic numbers from the bottom. if the topicList is full, return -1

Throws:
Exception

removeTopic

public boolean removeTopic(int t)
deletes the given topic number return true if successful, false otherwise


removeAll

public void removeAll()
deletes the given topic number return true if successful, false otherwise


equals

public boolean equals(Object obj)
if baseTopicNumbers are equal, return true otherwise false

Overrides:
equals in class Object

toString

public String toString()
toString method implementation

Overrides:
toString in class Object

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


For comments and suggestions please send e-mail to The NaradaBrokering Project