public class Transaction extends Object implements ActionListener
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
completed |
protected int |
id |
protected int |
uniqueId |
| Modifier | Constructor and Description |
|---|---|
protected |
Transaction(TransactionManager txManager)
Create new transaction executor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
find(Text name,
MgcpEndpoint[] endpoints)
Finds endpoints with specified name pattern.
|
MgcpCall |
getCall(Integer id,
boolean isNew) |
int |
getId() |
Exception |
getLastError()
Gets the last observed error.
|
MgcpProvider |
getProvider()
Provides access to the MGCP provider.
|
long |
getTime()
Provides access to the wall clock.
|
protected int |
nextID() |
void |
onComplete()
Called when action terminates execution normally.
|
void |
onFailure(Exception e)
Called when action execution terminates abnormally
|
void |
onRollback()
Called when action was rolled back
|
protected void |
process(Action action) |
void |
process(MgcpEvent event)
Handles event.
|
org.restcomm.media.scheduler.Scheduler |
scheduler()
Gets the access to the scheduler.
|
protected int id
protected int uniqueId
protected boolean completed
protected Transaction(TransactionManager txManager)
transactions - pool of the transaction objects.Controller - the controller instance.public org.restcomm.media.scheduler.Scheduler scheduler()
public int getId()
public MgcpProvider getProvider()
public int find(Text name, MgcpEndpoint[] endpoints) throws UnknownEndpointException
name - the endpoint name pattern. *endpoints - array for search resultUnknownEndpointException - if name pattern was wrong.public Exception getLastError()
public long getTime()
public void process(MgcpEvent event)
event - the event to handleprotected void process(Action action)
protected int nextID()
public void onComplete()
ActionListeneronComplete in interface ActionListenerpublic void onFailure(Exception e)
ActionListeneronFailure in interface ActionListenere - the exception cause failurepublic void onRollback()
ActionListeneronRollback in interface ActionListenerCopyright © 2017 TeleStax, Inc.. All Rights Reserved.