public class TransactionManager extends Object
| Modifier and Type | Field and Description |
|---|---|
protected CallManager |
callManager |
protected NamingTree |
namingService |
protected MgcpProvider |
provider |
| Constructor and Description |
|---|
TransactionManager(org.mobicents.media.server.scheduler.Clock clock,
org.mobicents.media.server.scheduler.Scheduler scheduler,
int size)
Creates new transaction's pool.
|
| Modifier and Type | Method and Description |
|---|---|
Transaction |
allocateNew(int id) |
Transaction |
find(int id)
Find active transaction with specified identifier.
|
Transaction |
findByTransactionNumber(int transactionNumber)
Finds a transaction by number (rather than unique transaction ID) in the
active transaction pool.
|
long |
getTime()
Provides access to the wall clock.
|
protected int |
nextID()
Generates unique transaction identifier.
|
protected int |
remainder()
Gets the remainder of unused transaction objects.
|
org.mobicents.media.server.scheduler.Scheduler |
scheduler()
Gets the access to the scheduler.
|
void |
setCallManager(CallManager callManager) |
void |
setMgcpProvider(MgcpProvider provider)
Assigns MGCP provider.
|
void |
setNamingService(NamingTree namingService)
Associates endpoint naming service.
|
void |
start() |
protected void |
terminate(Transaction t)
Terminates active transaction.
|
protected CallManager callManager
protected MgcpProvider provider
protected NamingTree namingService
public TransactionManager(org.mobicents.media.server.scheduler.Clock clock, org.mobicents.media.server.scheduler.Scheduler scheduler, int size)
clock - The wall clock of the server.scheduler - The job schedulersize - The size of the pool.public void start()
public void setNamingService(NamingTree namingService)
namingService - the endpoint naming service.public org.mobicents.media.server.scheduler.Scheduler scheduler()
public long getTime()
public void setCallManager(CallManager callManager)
public void setMgcpProvider(MgcpProvider provider)
provider - mgcp provider instancepublic Transaction find(int id)
id - the transaction identifier.public Transaction findByTransactionNumber(int transactionNumber)
transactionNumber - the number of the transaction to look forpublic Transaction allocateNew(int id)
protected void terminate(Transaction t)
t - the transaction to be terminatedprotected int nextID()
protected int remainder()
Copyright © 2017 TeleStax, Inc.. All Rights Reserved.