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:
kulikov

Field Summary
protected  MgcpCall call
           
protected  Connection connection
           
protected  Text id
           
protected  MgcpEndpoint mgcpEndpoint
           
static Text REASON_CODE
           
 
Constructor Summary
MgcpConnection()
           
 
Method Summary
 Text getDescriptor()
           
 Text getID()
           
 int getPacketsReceived()
           
 int getPacketsTransmitted()
           
 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 setGain(int gain)
           
 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

REASON_CODE

public static final Text REASON_CODE

id

protected Text id

call

protected MgcpCall call

mgcpEndpoint

protected MgcpEndpoint mgcpEndpoint

connection

protected Connection connection
Constructor Detail

MgcpConnection

public MgcpConnection()
Method Detail

getID

public Text getID()

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

setGain

public void setGain(int gain)

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 © 2012 TeleStax, Inc.. All Rights Reserved.