org.mobicents.mscontrol
Interface MsLink

All Superinterfaces:
java.io.Serializable

public interface MsLink
extends java.io.Serializable

A MsLink represents link between two org.mobicents.media.server.spi.Endpoint Application creates instance of MsLink by calling MsSession.createLink(MsLinkMode) As soon MsLink is created MsSession call's MsLink.fireMsLinkCreated() to fire the Event MsLinkEventID.LINK_CREATED MsLink maintains the reference to MsSession object for life of MsLink

Author:
Oleg Kulikov, amit.bhayani

Method Summary
 void addLinkListener(MsLinkListener listener)
           
 void addNotificationListener(MsNotificationListener listener)
           
 MsEndpoint[] getEndpoints()
          Returns back the Endpoints names that this link is trying to join
 java.lang.String getId()
          Gets the Link ID
 MsSession getSession()
          Gets the session to which this links belongs
 MsLinkState getState()
          Returns the state of MsLink
 void join(java.lang.String a, java.lang.String b)
          Joins specified endpoints.
 void release()
          Drops this link
 void removeLinkListener(MsLinkListener listener)
           
 void removeNotificationListener(MsNotificationListener listener)
           
 

Method Detail

getId

java.lang.String getId()
Gets the Link ID

Returns:
the unique identifier of this MsLink

getState

MsLinkState getState()
Returns the state of MsLink

Returns:
Instance of MsLinkState

getSession

MsSession getSession()
Gets the session to which this links belongs

Returns:
the session object.

join

void join(java.lang.String a,
          java.lang.String b)
Joins specified endpoints.

Parameters:
a - the name of the first endpoint.
b - the name of the second endpoint.

getEndpoints

MsEndpoint[] getEndpoints()
Returns back the Endpoints names that this link is trying to join

Returns:
MsEndpoint[]. Array has precisely two Endpoints that this Link is connecting

release

void release()
Drops this link


addLinkListener

void addLinkListener(MsLinkListener listener)

removeLinkListener

void removeLinkListener(MsLinkListener listener)

addNotificationListener

void addNotificationListener(MsNotificationListener listener)

removeNotificationListener

void removeNotificationListener(MsNotificationListener listener)


Copyright © 2008. All Rights Reserved.