org.mobicents.mscontrol
Interface MsConnection

All Superinterfaces:
java.io.Serializable

public interface MsConnection
extends java.io.Serializable

Represents the actual RTP connection. MsConnection is created by calling MsSession.createNetworkConnection. As soon as MsConnection is created MsSession call's MsConnection.fireConnectionInitialized() to fire the Event MsConnectionEventID.CONNECTION_INITIALIZED Through out the lifetime of MsConnection, it maintains the reference to MsSession

Author:
Oleg Kulikov, amit.bhayani

Method Summary
 void addConnectionListener(MsConnectionListener listener)
          Adds connection listener.
 void fireConnectionInitialized()
          As soon as Connection is created, MsSession calls this method to fire event MsConnectionEventID.CONNECTION_INITIALIZED
 java.lang.String getEndpoint()
          Returns the concrete endpoint which executes this endpoint.
 java.lang.String getId()
          Retrieves the MsConnection ID, basically a UUID
 java.lang.String getLocalDescriptor()
          Gets the session descriptor of the local end.
 java.lang.String getRemoteDescriptor()
          Gets the session descriptor of the remote end.
 MsSession getSession()
          Retrieves the MsSession that is associated with this MsConnection.
 org.mobicents.media.msc.common.MsConnectionState getState()
          Returns the state of MsConnection
 void modify(java.lang.String localDesc, java.lang.String remoteDesc)
          Creates or modify network connection on the media server side.
 void release()
          Deletes related connection from media server.
 void removeConnectionListener(MsConnectionListener listener)
          Removes connection listener.
 

Method Detail

getId

java.lang.String getId()
Retrieves the MsConnection ID, basically a UUID

Returns:

getSession

MsSession getSession()
Retrieves the MsSession that is associated with this MsConnection. This MsSession reference remains valid throughout the lifetime of the MsConnection object despite the state of the MsConnection object. This MsSession reference does not change once the MsConnection object has been created.

Returns:
MsSession object holding this connection.

getState

org.mobicents.media.msc.common.MsConnectionState getState()
Returns the state of MsConnection

Returns:

getLocalDescriptor

java.lang.String getLocalDescriptor()
Gets the session descriptor of the local end.

Returns:
session descriptor as specified by SDP.

getRemoteDescriptor

java.lang.String getRemoteDescriptor()
Gets the session descriptor of the remote end.

Returns:
session descriptor as specified by SDP.

getEndpoint

java.lang.String getEndpoint()
Returns the concrete endpoint which executes this endpoint.

Returns:
the name of the endpoint on the media server or null if connection is not created on media server yet.

addConnectionListener

void addConnectionListener(MsConnectionListener listener)
Adds connection listener.

Parameters:
listener - the listener object.

removeConnectionListener

void removeConnectionListener(MsConnectionListener listener)
Removes connection listener.

Parameters:
listener - the listener object was added previously.

modify

void modify(java.lang.String localDesc,
            java.lang.String remoteDesc)
Creates or modify network connection on the media server side.

Parameters:
remoteDesc - the session desriptor of the remote party.

release

void release()
Deletes related connection from media server. If the corresponding MsSession has only this MsConnection left then the state of MsSession becomes INVALID


fireConnectionInitialized

void fireConnectionInitialized()
As soon as Connection is created, MsSession calls this method to fire event MsConnectionEventID.CONNECTION_INITIALIZED



Copyright © 2008. All Rights Reserved.