org.mobicents.mscontrol.impl
Class MsLinkImpl

java.lang.Object
  extended by org.mobicents.mscontrol.impl.MsLinkImpl
All Implemented Interfaces:
java.io.Serializable, org.mobicents.media.server.spi.ConnectionListener, org.mobicents.media.server.spi.NotificationListener, org.mobicents.mscontrol.MsLink

public class MsLinkImpl
extends java.lang.Object
implements org.mobicents.mscontrol.MsLink, org.mobicents.media.server.spi.ConnectionListener, org.mobicents.media.server.spi.NotificationListener

Author:
Oleg Kulikov, amit bhayani
See Also:
Serialized Form

Field Summary
protected  java.util.concurrent.CopyOnWriteArrayList<org.mobicents.mscontrol.MsLinkListener> linkLocalLinkListeners
           
protected  java.util.concurrent.CopyOnWriteArrayList<org.mobicents.mscontrol.MsNotificationListener> linkLocalNotificationListeners
           
protected  org.apache.log4j.Logger logger
           
protected  MsSessionImpl session
           
 
Constructor Summary
MsLinkImpl(MsSessionImpl session, org.mobicents.mscontrol.MsLinkMode mode)
          Creates a new instance of MsLink
 
Method Summary
 void addLinkListener(org.mobicents.mscontrol.MsLinkListener listener)
           
 void addNotificationListener(org.mobicents.mscontrol.MsNotificationListener listener)
           
 void append(org.mobicents.mscontrol.events.MsRequestedEvent requestedEvent, java.lang.String endpointName)
           
 void append(org.mobicents.mscontrol.events.MsRequestedSignal requestedSignal, java.lang.String endpointName)
           
protected  java.lang.String getConnectionID(java.lang.String endpointName)
           
 org.mobicents.mscontrol.MsEndpoint[] getEndpoints()
           
 java.lang.String getId()
           
 org.mobicents.mscontrol.MsSession getSession()
           
 org.mobicents.mscontrol.MsLinkState getState()
           
 void join(java.lang.String a, java.lang.String b)
          Joins specified endpoints.
 void onStateChange(org.mobicents.media.server.spi.Connection connection, org.mobicents.media.server.spi.ConnectionState oldState)
           
 void release()
          Drops this link
 void removeLinkListener(org.mobicents.mscontrol.MsLinkListener listener)
           
 void removeNotificationListener(org.mobicents.mscontrol.MsNotificationListener listener)
           
 java.lang.String toString()
           
 void update(org.mobicents.media.server.spi.events.NotifyEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected org.apache.log4j.Logger logger

session

protected MsSessionImpl session

linkLocalLinkListeners

protected java.util.concurrent.CopyOnWriteArrayList<org.mobicents.mscontrol.MsLinkListener> linkLocalLinkListeners

linkLocalNotificationListeners

protected java.util.concurrent.CopyOnWriteArrayList<org.mobicents.mscontrol.MsNotificationListener> linkLocalNotificationListeners
Constructor Detail

MsLinkImpl

public MsLinkImpl(MsSessionImpl session,
                  org.mobicents.mscontrol.MsLinkMode mode)
Creates a new instance of MsLink

Method Detail

getId

public java.lang.String getId()
Specified by:
getId in interface org.mobicents.mscontrol.MsLink

getSession

public org.mobicents.mscontrol.MsSession getSession()
Specified by:
getSession in interface org.mobicents.mscontrol.MsLink

getState

public org.mobicents.mscontrol.MsLinkState getState()
Specified by:
getState in interface org.mobicents.mscontrol.MsLink

getConnectionID

protected java.lang.String getConnectionID(java.lang.String endpointName)

join

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

Specified by:
join in interface org.mobicents.mscontrol.MsLink
Parameters:
a - the name of the first endpoint.
b - the name of the second endpoint.

getEndpoints

public org.mobicents.mscontrol.MsEndpoint[] getEndpoints()
Specified by:
getEndpoints in interface org.mobicents.mscontrol.MsLink

addLinkListener

public void addLinkListener(org.mobicents.mscontrol.MsLinkListener listener)
Specified by:
addLinkListener in interface org.mobicents.mscontrol.MsLink

removeLinkListener

public void removeLinkListener(org.mobicents.mscontrol.MsLinkListener listener)
Specified by:
removeLinkListener in interface org.mobicents.mscontrol.MsLink

addNotificationListener

public void addNotificationListener(org.mobicents.mscontrol.MsNotificationListener listener)
Specified by:
addNotificationListener in interface org.mobicents.mscontrol.MsLink

removeNotificationListener

public void removeNotificationListener(org.mobicents.mscontrol.MsNotificationListener listener)
Specified by:
removeNotificationListener in interface org.mobicents.mscontrol.MsLink

release

public void release()
Drops this link

Specified by:
release in interface org.mobicents.mscontrol.MsLink

append

public void append(org.mobicents.mscontrol.events.MsRequestedSignal requestedSignal,
                   java.lang.String endpointName)

append

public void append(org.mobicents.mscontrol.events.MsRequestedEvent requestedEvent,
                   java.lang.String endpointName)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

onStateChange

public void onStateChange(org.mobicents.media.server.spi.Connection connection,
                          org.mobicents.media.server.spi.ConnectionState oldState)
Specified by:
onStateChange in interface org.mobicents.media.server.spi.ConnectionListener

update

public void update(org.mobicents.media.server.spi.events.NotifyEvent event)
Specified by:
update in interface org.mobicents.media.server.spi.NotificationListener


Copyright © 2008. All Rights Reserved.