public class MgcpEndpoint extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Text |
fullName |
protected MgcpProvider |
mgcpProvider |
static int |
STATE_BUSY |
static int |
STATE_FREE |
static int |
STATE_LOCKED |
static AtomicInteger |
txID |
| Constructor and Description |
|---|
MgcpEndpoint(Endpoint endpoint,
MgcpProvider mgcpProvider,
String domainName,
int port,
Collection<MgcpPackage> packages)
Constructs new endpoint activity.
|
| Modifier and Type | Method and Description |
|---|---|
void |
configure(boolean isALaw) |
MgcpConnection |
createConnection(MgcpCall call,
ConnectionType type,
boolean isLocal)
Creates new RTP connection.
|
void |
deleteAllConnections() |
void |
deleteConnection(Integer id)
Deletes connection.
|
MgcpConnection |
getConnection(Integer connectionID) |
Endpoint |
getEndpoint()
Provides the access to the native endpoint.
|
Text |
getFullName() |
String |
getName()
Gets the MGCP name of this activity.
|
Request |
getRequest()
Gets the access to the request executor.
|
int |
getState()
Gets the current state of this activity.
|
void |
lock()
Exclusively locks this activity.
|
protected void |
offer(MgcpConnection mgcpConnection)
Reclaims used connection object.
|
protected MgcpConnection |
poll(MgcpCall call)
Asks mgcp connection object from pool.
|
protected void |
send(MgcpEvent message,
SocketAddress address) |
void |
setMgcpEndpointStateListener(MgcpEndpointStateListener listener) |
void |
setMgcpListener(MgcpListener listener) |
void |
share()
Unlocks this activity if it is not busy
|
public static AtomicInteger txID
public static final int STATE_LOCKED
public static final int STATE_FREE
public static final int STATE_BUSY
protected Text fullName
protected MgcpProvider mgcpProvider
public MgcpEndpoint(Endpoint endpoint, MgcpProvider mgcpProvider, String domainName, int port, Collection<MgcpPackage> packages)
endpoint - native endpoint.public String getName()
public Text getFullName()
public Endpoint getEndpoint()
public void setMgcpListener(MgcpListener listener)
public void setMgcpEndpointStateListener(MgcpEndpointStateListener listener)
public int getState()
public Request getRequest()
public void lock()
public void share()
public MgcpConnection createConnection(MgcpCall call, ConnectionType type, boolean isLocal) throws TooManyConnectionsException, ResourceUnavailableException
TooManyConnectionsExceptionResourceUnavailableExceptionpublic void deleteConnection(Integer id)
id - the identifier of the relative connection activity.public void deleteAllConnections()
public MgcpConnection getConnection(Integer connectionID)
protected void send(MgcpEvent message, SocketAddress address)
protected MgcpConnection poll(MgcpCall call)
call - the call to which connection belongsprotected void offer(MgcpConnection mgcpConnection)
connection - the object to be reclaimedpublic void configure(boolean isALaw)
Copyright © 2014 TeleStax, Inc.. All Rights Reserved.