com.cisco.ipphone.sdk.mconference
Class ConferenceManager

java.lang.Object
  extended by com.cisco.ipphone.sdk.mconference.ConferenceManager

public class ConferenceManager
extends java.lang.Object

The ConferenceManager class controls all of state of the Conferences for the MConference application. ConferenceManager has static attributes which maintain a list of current Conferences and track the allocation of IP multicast addresses for those Conferences. ConferenceManager is a singleton class - which means there is only one instance of a ConferenceManager object in the entire JVM. This ensures a single point of management for all Conferences which is used by all threads (i.e., all web requests).


Nested Class Summary
 class ConferenceManager.Conference
          Conference is a simple inner class which holds all of the state information for a conference
 
Method Summary
 boolean addTalker(int conferenceId, Participant p)
          Adds the specified Particpant as a Talker in this Conference
 boolean addTalkRequest(int conferenceId, Participant p)
          Adds a Request to Talk to the specified Conference
 ConferenceManager.Conference createConference(java.lang.String name, java.lang.String owner, java.lang.String ownerIP)
          Creates a new Conference with specified attributes
 ConferenceManager.Conference deleteConference(int id)
          Deletes the Conference with the specified Conference ID
 ConferenceManager.Conference getConference(int id)
          Returns a reference to the Conference identified by the specified Id
static ConferenceManager getConferenceManager()
          This method returns a reference to the one and only ConferenceManager.
 ConferenceManager.Conference[] getConferences()
          Returns an Array of all currently defined Conferences
 Participant[] getTalkers(int conferenceId)
           
 Participant[] getTalkRequests(int conferenceId)
          Returns an Array of all Particpants currently Requesting to Talk
 void removeTalker(int conferenceId, java.lang.String ipAddress)
          Removes the specified Participant from the list of Talkers for this Conference
 void removeTalkRequest(int conferenceId, java.lang.String ipAddress)
          Removes all Requests to Talk for the specified Participant's IP address
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getConferenceManager

public static ConferenceManager getConferenceManager()
This method returns a reference to the one and only ConferenceManager. Notice there are no public constructors for the ConferenceManager class and this is the only method to obtain a reference to the ConferenceManager.

Returns:
the ConferenceManager

createConference

public ConferenceManager.Conference createConference(java.lang.String name,
                                                     java.lang.String owner,
                                                     java.lang.String ownerIP)
Creates a new Conference with specified attributes

Parameters:
name - the name of the Conference
owner - the name of the owner of the Conference
ownerIP - the IP address of the Conference Owner's phone
Returns:
boolean value indicates whether the Conference was successfully created (true) or not (false)

deleteConference

public ConferenceManager.Conference deleteConference(int id)
Deletes the Conference with the specified Conference ID

Parameters:
id - the Conference ID
Returns:
a reference to the deleted Conference or null if the specified Id is invalid

getConference

public ConferenceManager.Conference getConference(int id)
Returns a reference to the Conference identified by the specified Id

Parameters:
id -
Returns:
the Conference or null if the Id is invalid

getConferences

public ConferenceManager.Conference[] getConferences()
Returns an Array of all currently defined Conferences

Returns:
the Conferences

addTalkRequest

public boolean addTalkRequest(int conferenceId,
                              Participant p)
Adds a Request to Talk to the specified Conference

Parameters:
conferenceId -
p -
Returns:
true if successful, false if the Conference Id is invalid

removeTalkRequest

public void removeTalkRequest(int conferenceId,
                              java.lang.String ipAddress)
Removes all Requests to Talk for the specified Participant's IP address

Parameters:
conferenceId - the Conference Id
ipAddress - the IP address of the Participant's Phone

getTalkRequests

public Participant[] getTalkRequests(int conferenceId)
Returns an Array of all Particpants currently Requesting to Talk

Parameters:
conferenceId -
Returns:
the Participants requesting to Talk

addTalker

public boolean addTalker(int conferenceId,
                         Participant p)
Adds the specified Particpant as a Talker in this Conference

Parameters:
conferenceId - the Conference Id
p - the Particpant
Returns:
true if the Talker was added, false if the Conference Id is invalid

removeTalker

public void removeTalker(int conferenceId,
                         java.lang.String ipAddress)
Removes the specified Participant from the list of Talkers for this Conference

Parameters:
conferenceId - the Conference Id
ipAddress - the IP

getTalkers

public Participant[] getTalkers(int conferenceId)