org.mobicents.media.server.mgcp.controller
Class MgcpConnection

java.lang.Object
  extended by org.mobicents.media.server.mgcp.controller.MgcpConnection
All Implemented Interfaces:
ConnectionFailureListener

public class MgcpConnection
extends Object
implements ConnectionFailureListener

Represents the connection activity.

Author:
yulian oifa

Field Summary
protected  MgcpCall call
           
protected  Connection connection
           
static AtomicInteger connectionID
           
protected  Integer id
           
protected  MgcpEndpoint mgcpEndpoint
           
static Text REASON_CODE
           
protected  Text textualId
           
 
Constructor Summary
MgcpConnection()
           
 
Method Summary
 Text getDescriptor()
           
 int getID()
           
 int getPacketsReceived()
           
 int getPacketsTransmitted()
           
 Text getTextualID()
           
 void onFailure()
           
 void release()
          Terminates this activity and deletes connection.
protected  void setCall(MgcpCall call)
          Assigns call object to which this connection belongs.
 void setCallAgent(SocketAddress callAgent)
           
 void setDtmfClamp(boolean dtmfClamp)
           
 void setMode(ConnectionMode mode)
           
 void setMode(Text mode)
           
 void setOtherParty(MgcpConnection other)
           
 void setOtherParty(Text sdp)
           
 void wrap(MgcpEndpoint mgcpEndpoint, MgcpCall call, Connection connection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connectionID

public static AtomicInteger connectionID

REASON_CODE

public static final Text REASON_CODE

id

protected Integer id

textualId

protected Text textualId

call

protected MgcpCall call

mgcpEndpoint

protected MgcpEndpoint mgcpEndpoint

connection

protected Connection connection
Constructor Detail

MgcpConnection

public MgcpConnection()
Method Detail

getID

public int getID()

getTextualID

public Text getTextualID()

setCall

protected void setCall(MgcpCall call)
Assigns call object to which this connection belongs.

Parameters:
call - the call object.

setCallAgent

public void setCallAgent(SocketAddress callAgent)

wrap

public void wrap(MgcpEndpoint mgcpEndpoint,
                 MgcpCall call,
                 Connection connection)

setMode

public void setMode(Text mode)
             throws ModeNotSupportedException
Throws:
ModeNotSupportedException

setMode

public void setMode(ConnectionMode mode)
             throws ModeNotSupportedException
Throws:
ModeNotSupportedException

setDtmfClamp

public void setDtmfClamp(boolean dtmfClamp)

getDescriptor

public Text getDescriptor()

setOtherParty

public void setOtherParty(Text sdp)
                   throws IOException
Throws:
IOException

setOtherParty

public void setOtherParty(MgcpConnection other)
                   throws IOException
Throws:
IOException

release

public void release()
Terminates this activity and deletes connection.


getPacketsTransmitted

public int getPacketsTransmitted()

getPacketsReceived

public int getPacketsReceived()

onFailure

public void onFailure()
Specified by:
onFailure in interface ConnectionFailureListener


Copyright © 2013 TeleStax, Inc.. All Rights Reserved.