org.mobicents.mscontrol
Interface MsProvider

All Superinterfaces:
java.io.Serializable

public interface MsProvider
extends java.io.Serializable

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

Author:
Oleg Kulikov, amit bhayani

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
 java.util.List<MsLink> getMsLinks(java.lang.String endpointName)
          Gets List of MsLink object for given endpointName
 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

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.

addNotificationListener

void addNotificationListener(MsNotificationListener listener)
Add a notification listener to all (feature and current) within the domain of this provider.

Parameters:
listener -

removeNotificationListener

void removeNotificationListener(MsNotificationListener listener)
Remove MsNotificationListener

Parameters:
listener -

addConnectionListener

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

Parameters:
listener - object that receives the specified events.

removeConnectionListener

void removeConnectionListener(MsConnectionListener listener)
Removes connection listener

Parameters:
listener - this listener is removed

addResourceListener

void addResourceListener(MsResourceListener listener)
Deprecated. 

Add a resource listener to all resources under this MsProvider.

Parameters:
listener - object that receives the specified events.

addLinkListener

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

Parameters:
listener - object that receives the specified events.

removeLinkListener

void removeLinkListener(MsLinkListener listener)
Removes link listener

Parameters:
listener - object that receives the specified events.

createSession

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

Returns:
MsSession object.

getEventFactory

MsEventFactory getEventFactory()
Get instance of MsEventFactory

Returns:
instance of MsEventFactory

getMsConnection

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

Parameters:
msConnectionId -
Returns:
instance of MsConnection

getMsConnections

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

Parameters:
endpointName -
Returns:
List of MsConnection

getMsLinks

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

Parameters:
endpointName - Endpoint name
Returns:
List of MsLink


Copyright © 2009. All Rights Reserved.