|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MsProvider
This is the provider class which is used to create the MsSession.
Through out the Application life cycle MsProvider remains the
same. Application that are interested in listening MsSessionEvent,
MsConnectionEvent, MsLinkEvent and MsNotifyEvent
calls the respective addlistener methods passing instance of class that
implements respective listeners.
Use MsPeer.getProvider() to get the instance of MsProvider
| Method Summary | |
|---|---|
void |
addConnectionListener(MsConnectionListener listener)
Add a connection listener to all connections under this MsProvider. |
void |
addLinkListener(MsLinkListener listener)
Add a link listener to all terminations. |
void |
addNotificationListener(MsNotificationListener listener)
Add a notification listener to all (feature and current) within the domain of this provider. |
void |
addResourceListener(MsResourceListener listener)
Deprecated. |
void |
addSessionListener(MsSessionListener listener)
Add a session listener to all (feature and current) within the domain of this provider. |
MsSession |
createSession()
Creates a new instance of the session with no links. |
MsEventFactory |
getEventFactory()
Get instance of MsEventFactory |
MsConnection |
getMsConnection(java.lang.String msConnectionId)
Get the MsConnection for the msConnectionId passed. |
java.util.List<MsConnection> |
getMsConnections(java.lang.String endpointName)
Gets List of MsConnection object for given endpointName |
MsSignalDetector |
getSignalDetector(java.lang.String endpointName)
Deprecated. |
MsSignalGenerator |
getSignalGenerator(java.lang.String endpointName)
Deprecated. |
void |
removeConnectionListener(MsConnectionListener listener)
Removes connection listener |
void |
removeLinkListener(MsLinkListener listener)
Removes link listener |
void |
removeNotificationListener(MsNotificationListener listener)
Remove MsNotificationListener |
void |
removeSessionListener(MsSessionListener listener)
Removes a listener that was previously registered. |
| Method Detail |
|---|
void addSessionListener(MsSessionListener listener)
listener - object that receives the specified eventsvoid removeSessionListener(MsSessionListener listener)
listener - Listener object.void addNotificationListener(MsNotificationListener listener)
listener - void removeNotificationListener(MsNotificationListener listener)
listener - void addConnectionListener(MsConnectionListener listener)
listener - object that receives the specified events.void removeConnectionListener(MsConnectionListener listener)
listener - this listener is removedvoid addResourceListener(MsResourceListener listener)
listener - object that receives the specified events.void addLinkListener(MsLinkListener listener)
listener - object that receives the specified events.void removeLinkListener(MsLinkListener listener)
listener - object that receives the specified events.MsSession createSession()
MsEventFactory getEventFactory()
MsEventFactory
MsEventFactoryMsSignalGenerator getSignalGenerator(java.lang.String endpointName)
MsRequestedSignal to play the
announcement on endpoint and also request's for announcement complete or
fail MsRequestedEvent
MsEventFactory eventFactory = msProvider.getEventFactory();
MsPlayRequestedSignal play = null;
play = (MsPlayRequestedSignal) eventFactory.createRequestedSignal(MsAnnouncement.PLAY);
play.setURL(url);
MsRequestedEvent onCompleted = null;
MsRequestedEvent onFailed = null;
onCompleted = eventFactory.createRequestedEvent(MsAnnouncement.COMPLETED);
onCompleted.setEventAction(MsEventAction.NOTIFY);
onFailed = eventFactory.createRequestedEvent(MsAnnouncement.FAILED);
onFailed.setEventAction(MsEventAction.NOTIFY);
MsRequestedSignal[] requestedSignals = new MsRequestedSignal[] { play };
MsRequestedEvent[] requestedEvents = new MsRequestedEvent[] { onCompleted, onFailed };
msEndpoint.execute(requestedSignals, requestedEvents, connection);
endpointName -
MsSignalGeneratorMsSignalDetector getSignalDetector(java.lang.String endpointName)
MsRequestedEvent to detect for
events. For example to detect DTMF
MsEventFactory factory = msProvider.getEventFactory();
MsDtmfRequestedEvent dtmf = (MsDtmfRequestedEvent) factory.createRequestedEvent(DTMF.TONE);
MsRequestedSignal[] signals = new MsRequestedSignal[] {};
MsRequestedEvent[] events = new MsRequestedEvent[] { dtmf };
msEndpoint.execute(signals, events, connection);
MsConnection getMsConnection(java.lang.String msConnectionId)
msConnectionId -
MsConnectionjava.util.List<MsConnection> getMsConnections(java.lang.String endpointName)
endpointName -
MsConnection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||