|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MsSession
A MsSession is a transient association of (zero or more)
connection for the purposes of engaging in a real-time communications
interchange.
The session and its associated connection objects describe the control and
media flows taking place in a communication network. The
MsProvider adjusts the session, connection and link objects to
reflect the results of the combined command actions.
Applications create instances of a MsSession object with the
MsProvider.createSession() method, which returns a MsSession
object that has zero connections and is in the IDLE state.
MsSession maintains a reference to its
MsProvider for the life of that MsSession
object. The MsProvider object instance does not change
throughout the lifetime of the MsSession object. The
MsProvider associated with a MsSession is
obtained via the getProvider() method.
| Method Summary | |
|---|---|
void |
addSessionListener(MsSessionListener listener)
Add a listener to this session. |
MsLink |
createLink(MsLinkMode mode)
Creates local link that joines two endpoints and attach it to this session. |
MsConnection |
createNetworkConnection(java.lang.String endpointName)
Creates a new network connection and attaches it to this session. |
java.util.List<MsConnection> |
getConnections()
Returns the list of MsConnection associated with this MsSession |
java.lang.String |
getId()
Get the unique id of this session |
MsProvider |
getProvider()
Retrieves the provider handling this session object. |
MsSessionState |
getState()
Retrieves the state of the session. |
void |
removeSessionListener(MsSessionListener listener)
Removes a listener from this session. |
| Method Detail |
|---|
java.lang.String getId()
MsProvider getProvider()
MsSession object has
been created, despite the state of the MsSession object.
MsSessionState getState()
MsSessionState
MsConnection createNetworkConnection(java.lang.String endpointName)
MsConnection object is associated with an endpoint name
corresponding to the string given as an input parameter.
Note that following this operation the returned MsConnection object must
still be "modified" which can be accomplished using the
MsConnection.modify(...)
endpointName -
specifies the identifier of the media server endpoint. If you
want connection to be created on new Endpoint then pass
wildcard '$' with endpointName. For example
'media/trunk/Announcement/$'. Once connection
is created, calling connection.getEndpoint()
will return instance of MsEndpoint and calling
getLocalName() on this returned
MsEndpoint will give the actual endpoint name,
for example 'media/trunk/Announcement/enp-1'
It's also possible to create connection on already known endpoint for example
MsSession session;
...
MsConnection msConnection = session.createNetworkConnection("media/trunk/Conference/enp-3");
MsLink createLink(MsLinkMode mode)
mode - specifies the mode of the link. Valid modes are
MsLinkMode
void addSessionListener(MsSessionListener listener)
listener - object that receives the specified eventsvoid removeSessionListener(MsSessionListener listener)
listener - Listener object.java.util.List<MsConnection> getConnections()
MsConnection associated with this MsSession
MsConnection contained in this session
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||