|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objecthp.opencall.media.platform.Capability
hp.opencall.media.platform.ResourceCapability
hp.opencall.media.service.Session
hp.opencall.media.ccapi.ConferenceSession
ConferenceSession is the center class of the conference API.
ConferenceSession models a conference session within the Media Platform and acts as the enclosing object for all the resources that are involved in the conference( ConfCP, AsyncMediaGroup...)
If the user doesn't need to deal with this conference resources, he can use the default ConferenceSession's implementation. In any cases the Platform creates this session on the occurence of the registration of the first user.
The Platform starts up the conference session as follows
1. It initializes a new ConferenceSession .
2. It invokes its newConferenceSession method if the user has extended default ConferenceSession class
The newConferenceSession method is thus the entry point for the extended conferenceSession service.
Session Termination
A session is terminated by invoking the release() method. All the associated resources (such as AsyncMediaGroup) are released, and all associated confCP are unregistered from the conference.
Moreover It releases itself as soon as it hasn't anymore ConfCP registered or Conferencing.
Access
A handler on this session is given in CCSession with method register through a ConferenceIF interface.
This handler is a proxy on ConferenceSession built with interface ConferenceIF. It enables to call ConferenceIF methods from
CCSession User Thread (in addition to Conference User Thread)
Thread Management
The Platform schedules a thread, referred to as a Conference User Thread, to invoke
the Call Control API callback methods. For example, newConferenceSession is invoked
on a Conference User Thread.
In order to ensure appropriate synchronization in the platform, conference API methods (including
AsyncMediaGroup methods) can only be called from
the Conference User Thread that last called back to the ConferenceSession user code.
It is required to implicitely or explicitely create new threads for the
application's own purposes, referred to as Application Threads,
care should be taken to not invoke those API methods from these threads.
The same proxy mechanism as the one implemented for CCSession enables to create a proxy on ConferenceSession with users interfaces (implemented by the oclet extending ConferenceSession) on which can be called methods from external threads. This proxy instance is given through an Object and a cast in the interface is needed to call a method on it.
This ConferenceSession is called back by the framework on each ConfCP state change. It is also called back on ConferenceSession state changes. Note that the RELEASED conferenceSessionStateChange is useful to manage conference id.
| Field Summary | |
static hp.opencall.media.platform.AccessControlManager |
acm
|
static int |
ACTIVE
The session is ACTIVE as soon as one ConfCP is Conferencing |
static int |
IDLE
not yet initialized |
static int |
OPENED
The session is OPENED as soon as one ConfCP is Registered |
static int |
RELEASED
The session is RELEASED as soon a a release() method is called or if no more ConfCP is Registered |
static String[] |
sName
Table indexed by state value to return state name |
| Fields inherited from class hp.opencall.media.service.Session |
_defaultStreamsLogMask, myTerminal |
| Method Summary | |
void |
confCPStateChange(ConfCP aCP,
int aNewCPState)
Indicates state changes of conferencing call parties (ConfCP) linked to the conference . |
void |
conferenceSessionStateUpdate(int aNewState)
Indicates a ConferenceSession state change. |
ConfCP[] |
getConfCP()
Gets a table of the ConfCP objects associated to this ConferenceSession. |
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 |
Color |
getStateColor()
|
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. |
AsyncMediaGroup |
loopConf(ConfigSpec aSpec)
Creates an AsyncMediaGroup and connects it to the Conference. |
static void |
main(String[] arguments)
|
void |
newConferenceSession()
Called by the platform at extended conference session startup. |
void |
release()
Terminates the conference session. |
String |
toString()
|
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. |
void |
unloopConf(AsyncMediaGroup asycMG)
This method disconnects and releases the given AsyncMediaGroup from the conference Pre-conditions: 1. |
| Methods inherited from class hp.opencall.media.service.Session |
bindSessionToTerminal, checkObjectInterfaces, getName, getSessionAC, getTerminalAddress, printOut, sessionId, setDefaultStreamsLogMask |
| Methods inherited from class hp.opencall.media.platform.ResourceCapability |
checkCapability, revoke |
| Methods inherited from class hp.opencall.media.platform.Capability |
addRevocationListener, removeRevocationListener |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final hp.opencall.media.platform.AccessControlManager acm
public static final int IDLE
public static final int OPENED
public static final int ACTIVE
public static final int RELEASED
public static final String[] sName
| Method Detail |
public static void main(String[] arguments)
public String toString()
public Color getStateColor()
public ConfCP[] getConfCP()
throws AccessControlException
BadThreadException - if the method is not called on the proper User
Thread.
AccessControlException
public void joinAll()
throws AccessControlException
ConferenceIF
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
joinAll in interface ConferenceIFAccessControlException
public void unjoinAll()
throws AccessControlException
ConferenceIF
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
unjoinAll in interface ConferenceIFAccessControlExceptionpublic void release()
ConferenceIF
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.
release in interface ConferenceIF
public int getState()
throws AccessControlException
ConferenceIF
getState in interface ConferenceIFAccessControlExceptionpublic ConferenceSpec getConferenceSpec()
ConferenceIF
getConferenceSpec in interface ConferenceIF
public Object getProxy(Class aClass)
throws CCBadParamsException
ConferenceIFThe 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:
getProxy in interface ConferenceIFCCBadParamsException - if the interface is not implemented by the oclet
public Object getProxy(Class[] aInterTab)
throws CCBadParamsException
ConferenceIFThe 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 ConferenceIF.getProxy(Class).
Pre-conditions:
1. The oclet must implement the interfaces given in parameter
Post-conditions:
getProxy in interface ConferenceIFCCBadParamsException - if the interfaces are not implemented by the oclet
public int getRegisteredConfCPNb()
throws AccessControlException
ConferenceIF
getRegisteredConfCPNb in interface ConferenceIFAccessControlException
public int getConferencingConfCPNb()
throws AccessControlException
ConferenceIF
getConferencingConfCPNb in interface ConferenceIFAccessControlException
public AsyncMediaGroup loopConf(ConfigSpec aSpec)
throws AccessControlException,
BadConfigSpecException
Pre-conditions:
1. Enough MediaProcessing resources must be available so that a
MediaGroup can be allocated.
BadThreadException - if the method is not called on the proper User Thread
ResourceNotAvailableException - if no more MediaGroup resources
are available.
AccessControlException
BadConfigSpecException
public void unloopConf(AsyncMediaGroup asycMG)
throws AccessControlException
Pre-conditions:
1. The AsyncMediaGroup must have been created.
BadThreadException - if the method is not called on the proper User
Thread.
AccessControlExceptionpublic void newConferenceSession()
This method is called by the platform the first time method register(...) is called for a conference. It is called in a conference User Thread
public void confCPStateChange(ConfCP aCP,
int aNewCPState)
Called by the framework to inform on a ConfCP state change.
aCP - the conference call party subject to the change.aNewCPState - the new Call Party state. It can be REGISTERED, CONFERENCING, INVALID
public void conferenceSessionStateUpdate(int aNewState)
Called by the framework to inform of a ConferenceSession state change. The RELEASED state reception is useful to manage conference ids. This call back enables conference management. It ensures every conferencing resources are released (every ConfCP invalid ...)
aNewState - The new session state. It can be Idle, Opened, Active or
Released.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||