org.mobicents.mscontrol
Interface MsProvider


public interface MsProvider

This is the provider class which is used to create the MsSession, MsSignalGenerator and MsSignalDetector. 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

Author:
Oleg Kulikov, amit bhayani

Method Summary
 void addConnectionListener(MsConnectionListener connectionListener)
          Add a connection listener to all connections under this MsProvider.
 void addLinkListener(MsLinkListener listener)
          Add a link listener to all terminations.
 void addResourceListener(MsResourceListener listener)
          Add a resource listener to all resources under this MsProvider.
 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.
 MsCallbackHandler getCallbackHandler()
          Get the CallbackHandler implementation
 java.util.List<MsConnectionListener> getConnectionListeners()
          Returns the List of MsConnectionListener registered with MsProvider
 java.util.List<MsLinkListener> getLinkListeners()
          Returns the List of MsLinkListener registered with MsProvider
 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
 java.util.List<MsResourceListener> getResourceListeners()
          Returns List of MsResourceListener registered with MsProvider
 java.util.List<MsSessionListener> getSessionListeners()
          Returns the list of MsSessionListners registered with MsProvider
 MsSignalDetector getSignalDetector(java.lang.String endpointName)
          Creates a new instance of SignalDetector for given EndpointName
 MsSignalGenerator getSignalGenerator(java.lang.String endpointName)
          Creates a new instance of MsSignalGenerator for given EndpointName
 void removeLinkListener(MsLinkListener listener)
          Removes link listener
 void removeSessionListener(MsSessionListener listener)
          Removes a listener that was previously registered.
 void setCallbackHandler(MsCallbackHandler callbackHandler)
          An application ( that implements MsCallbackHandler ) using MsProvider can be called synchronously by setting CallbackHandler here.
 

Method Detail

addSessionListener

void addSessionListener(MsSessionListener listener)
Add a session listener to all (feature and current) within the domain of this provider.

Parameters:
listener - object that receives the specified events

removeSessionListener

void removeSessionListener(MsSessionListener listener)
Removes a listener that was previously registered.

Parameters:
listener - Listener object.

getSessionListeners

java.util.List<MsSessionListener> getSessionListeners()
Returns the list of MsSessionListners registered with MsProvider

Returns:

addConnectionListener

void addConnectionListener(MsConnectionListener connectionListener)
Add a connection listener to all connections under this MsProvider.

Parameters:
MsConnectionListener - object that receives the specified events.

getConnectionListeners

java.util.List<MsConnectionListener> getConnectionListeners()
Returns the List of MsConnectionListener registered with MsProvider

Returns:

addResourceListener

void addResourceListener(MsResourceListener listener)
Add a resource listener to all resources under this MsProvider.

Parameters:
MsResourceListener - object that receives the specified events.

getResourceListeners

java.util.List<MsResourceListener> getResourceListeners()
Returns List of MsResourceListener registered with MsProvider

Returns:

addLinkListener

void addLinkListener(MsLinkListener listener)
Add a link listener to all terminations.

Parameters:
MsLinkListener - object that receives the specified events.

removeLinkListener

void removeLinkListener(MsLinkListener listener)
Removes link listener

Parameters:
MsLinkListener - object that receives the specified events.

getLinkListeners

java.util.List<MsLinkListener> getLinkListeners()
Returns the List of MsLinkListener registered with MsProvider

Returns:

createSession

MsSession createSession()
Creates a new instance of the session with no links.

Returns:
MsSession object.

getSignalGenerator

MsSignalGenerator getSignalGenerator(java.lang.String endpointName)
Creates a new instance of MsSignalGenerator for given EndpointName

Parameters:
endpointName -
Returns:

getSignalDetector

MsSignalDetector getSignalDetector(java.lang.String endpointName)
Creates a new instance of SignalDetector for given EndpointName

Parameters:
endpointName -
Returns:

getMsConnection

MsConnection getMsConnection(java.lang.String msConnectionId)
Get the MsConnection for the msConnectionId passed.

Parameters:
msConnectionId -
Returns:

getMsConnections

java.util.List<MsConnection> getMsConnections(java.lang.String endpointName)
Gets List of MsConnection object for given endpointName

Parameters:
endpointName -
Returns:

setCallbackHandler

void setCallbackHandler(MsCallbackHandler callbackHandler)
An application ( that implements MsCallbackHandler ) using MsProvider can be called synchronously by setting CallbackHandler here. If the application is not interested in callback than it may not set it and CallbackHandler will be null;

Parameters:
callbackHandler -

getCallbackHandler

MsCallbackHandler getCallbackHandler()
Get the CallbackHandler implementation

Returns:


Copyright © 2008. All Rights Reserved.