hp.opencall.media.ccapi
Interface ConferenceIF

All Known Implementing Classes:
ConferenceSession

public interface ConferenceIF

This Interface allows the CCSession to access information about a conference Session.

IMPORTANT NOTE : developper should take particular care against race conditions when using getProxy(Class[]) or getProxy(Class).

Since:
OCMP 2.2

Field Summary
static int ACTIVE
          The ConferenceSession is in the Active State as soon as one ConfCP is Conferencing.
static int IDLE
          The ConferenceSession is in the Idle State.
static int OPENED
          The ConferenceSession is in the Opened State as soon as one ConfCP is Registered and no one Conferencing.
static int RELEASED
          The ConferenceSession is in the Released State as soon as a release() method is called or if no more ConfCP is Registered and Conferencing
 
Method Summary
 ConferenceSpec getConferenceSpec()
          Returns the ConferenceSpec of the ConferenceSession.
 int getConferencingConfCPNb()
          Gives the number of ConfCP joined to the conference.
 Object getProxy(Class aClass)
          Creates a proxy instance on which developers methods implemented by the ConferenceSession oclet can be called from external threads.
 Object getProxy(Class[] aInterTab)
          Creates a proxy instance on which developers methods implemented by the ConferenceSession oclet can be called from external threads.
 int getRegisteredConfCPNb()
          Gives the number of ConfCP registered to the conference.
 int getState()
          Returns the state of the ConferenceSession
 void joinAll()
          Notifies every CP registered to the conference that a joinAll() has been triggered by calling method onjoinAll(CP aCP, ConferenceIF aConfIF) of ConferenceListeners.
 void release()
          Terminates the conference session.
 void unjoinAll()
          Notifies every CP joined to the conference that a unjoinAll() has been triggered by calling method onunjoinAll(CP aCP, ConferenceIF aConfIF) of ConferenceListeners.
 

Field Detail

IDLE

public static final int IDLE
The ConferenceSession is in the Idle State.

See Also:
Constant Field Values

OPENED

public static final int OPENED
The ConferenceSession is in the Opened State as soon as one ConfCP is Registered and no one Conferencing.

See Also:
Constant Field Values

ACTIVE

public static final int ACTIVE
The ConferenceSession is in the Active State as soon as one ConfCP is Conferencing.

See Also:
Constant Field Values

RELEASED

public static final int RELEASED
The ConferenceSession is in the Released State as soon as a release() method is called or if no more ConfCP is Registered and Conferencing

See Also:
Constant Field Values
Method Detail

getState

public int getState()
             throws AccessControlException
Returns the state of the ConferenceSession

Throws:
AccessControlException
Since:
OCMP 2.2

joinAll

public void joinAll()
             throws AccessControlException
Notifies every CP registered to the conference that a joinAll() has been triggered by calling method onjoinAll(CP aCP, ConferenceIF aConfIF) of ConferenceListeners.

Pre-conditions:
1. This method must be called from a Conference User Thread or on the proxy given back by method register of CCSession.
2. This notification will occure only if the CP is registered to conference with a ConferenceListener not null.(The associated ConfCP is Registered).

Post-conditions:
1. Method onjoinAll(CP aCP, ConferenceIF aConfIF) of registered CP is called in a CCSession User Thread

Throws:
BadThreadException - if the method is not called in the proper thread

AccessControlException
Since:
OCMP 2.2

unjoinAll

public void unjoinAll()
               throws AccessControlException
Notifies every CP joined to the conference that a unjoinAll() has been triggered by calling method onunjoinAll(CP aCP, ConferenceIF aConfIF) of ConferenceListeners.

Pre-conditions:
1. This method must be called from a Conference User Thread or on the proxy given back by method register of CCSession.
2. This notification will occure only if the CP is registered to conference with a ConferenceListener not null and if its has been joined to the conference (The associated ConfCP is Conferencing).

Post-conditions:
1. Method onunjoinAll(CP aCP, ConferenceIF aConfIF) of joined CP is called in a CCSession User Thread

Throws:
BadThreadException - if the method is not called in the proper thread

AccessControlException
Since:
OCMP 2.2

release

public void release()
Terminates the conference session.

Pre-conditions:
No condition on the thread from which this method is called

The session and all its associated resources are released Every AsyncMediaGroups are released, CP registered or joined to the conference are unjoined and unregistered from the conference.(ConfCP become Invalid) CP registered with a ConferenceListener are notified that a release has been triggered by call back method onrelease(CP aCP, ConferenceIF aConfIF) on a CCSession User Thread. CP state doesn't change

Post-conditions:
The session becomes RELEASED. Method conferenceSessionStateChange(Released) is called back at the end of the resources clear. Any further reference to this conference session object will throw ResourceReleasedException.

Since:
OCMP 2.2

getConferenceSpec

public ConferenceSpec getConferenceSpec()
Returns the ConferenceSpec of the ConferenceSession.

Since:
OCMP 2.2

getProxy

public Object getProxy(Class aClass)
                throws CCBadParamsException
Creates a proxy instance on which developers methods implemented by the ConferenceSession oclet can be called from external threads.

The proxy must be created with an interface implemented by the extended ConferenceSession. It gives back a Object. A cast in the interface class is needed to call one of its method.

VERY IMPORTANT NOTE
A typical use case would be

 ConferenceIF myConferenceIF = myCCsession.register( myCallParty, myConferenceSpec, .... );
 SpecificConferenceIF mySpecificConferenceIF = (SpecificConferenceIF) myConferenceIF.getProxy(...);
 mySpecificConferenceIF.someSpecificMethod(....);// as someSpecificMethod() runs asynchronously in another thread, unpredictable result may occur !
 myAsyncMediaGroup.join( myConferenceIF );
 
The preferred method to avoid race conditions is to call
 class MyConferenceSpec extend ConferenceSpec { .... }
 MyConferenceSpec myConferenceSpec = new MyConferenceSpec(.... parameters ....) {
     public .... getOneOfMyParameters() { .... }
 }
 someSpecificMethod(.... myConferenceSpec.getOneOfMyParameters() ....);
 
form the conference session thread, having a custom class inherit ConferenceSpec to transmit parameters.

Pre-conditions:
1. The oclet must implement the interfaces given in parameter
Post-conditions:

Throws:
CCBadParamsException - if the interface is not implemented by the oclet

Since:
OCMP 2.2

getProxy

public Object getProxy(Class[] aInterTab)
                throws CCBadParamsException
Creates a proxy instance on which developers methods implemented by the ConferenceSession oclet can be called from external threads.

The proxy must be created with a list of user interfaces implemented by the extended ConferenceSession. It gives back a Object. A cast in the interface class is needed to call an interface method.

See IMPORTANT NOTE in getProxy(Class).

Pre-conditions:
1. The oclet must implement the interfaces given in parameter
Post-conditions:

Throws:
CCBadParamsException - if the interfaces are not implemented by the oclet

Since:
OCMP 2.2

getRegisteredConfCPNb

public int getRegisteredConfCPNb()
                          throws AccessControlException
Gives the number of ConfCP registered to the conference.

Throws:
BadThreadException - if the method is not called on the proper User Thread.

AccessControlException
Since:
OCMP 2.2

getConferencingConfCPNb

public int getConferencingConfCPNb()
                            throws AccessControlException
Gives the number of ConfCP joined to the conference. (ConfCP Conferencing)

Throws:
BadThreadException - if the method is not called on the proper User Thread.

AccessControlException
Since:
OCMP 2.2