|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.mgcp.stack.TransactionHandler
public abstract class TransactionHandler
Implements the base gateway control interface. The MGCP implements the media gateway control interface as a set of transactions. The transactions are composed of a command and a mandatory response. There are eight types of command:
| Field Summary | |
|---|---|
protected jain.protocol.ip.mgcp.JainMgcpCommandEvent |
commandEvent
Used to hold parsed command event |
static int |
LONGTRAN_TIMER_TIMEOUT
|
protected jain.protocol.ip.mgcp.JainMgcpResponseEvent |
responseEvent
Used to hold parsed response event * |
protected JainMgcpStackImpl |
stack
|
| Constructor Summary | |
|---|---|
TransactionHandler(JainMgcpStackImpl stack)
Creates a new instance of TransactionHandle Used by provider to prepare origination transaction for sending command message from an application to the stack. |
|
TransactionHandler(JainMgcpStackImpl stack,
java.net.InetAddress remoteAddress,
int port)
Creates a new instance of TransactionHandle. |
|
| Method Summary | |
|---|---|
protected abstract jain.protocol.ip.mgcp.JainMgcpCommandEvent |
decodeCommand(java.lang.String message)
Decodes MGCP command message into jain mgcp command event object. |
protected abstract jain.protocol.ip.mgcp.JainMgcpResponseEvent |
decodeResponse(java.lang.String message)
Decodes MGCP response message into jain mgcp response event object. |
protected abstract java.lang.String |
encode(jain.protocol.ip.mgcp.JainMgcpCommandEvent event)
Encodes command event object into MGCP command message. |
protected abstract java.lang.String |
encode(jain.protocol.ip.mgcp.JainMgcpResponseEvent event)
Encodes response event object into MGCP response message. |
int |
getLocalTID()
Returns the transaction handle sent from MGCP provider to listener. |
protected java.lang.Object |
getObjectSource(int tid)
constructs the object source for a command |
int |
getRemoteTID()
Returns the transaction handle sent from application to the MGCP provider. |
boolean |
isCommand()
|
void |
receiveCommand(java.lang.String message)
Used by stack for transmitting received MGCP command message to the application. |
void |
receiveResponse(java.lang.String message)
Used by stack for relaying received MGCP response messages to the application. |
protected void |
release()
Release this transaction and frees all allocated resources. |
void |
run()
|
void |
setCommand(boolean isCommand)
|
void |
setCommandEvent(jain.protocol.ip.mgcp.JainMgcpCommandEvent commandEvent)
|
void |
setResponseEvent(jain.protocol.ip.mgcp.JainMgcpResponseEvent responseEvent)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LONGTRAN_TIMER_TIMEOUT
protected JainMgcpStackImpl stack
protected jain.protocol.ip.mgcp.JainMgcpCommandEvent commandEvent
protected jain.protocol.ip.mgcp.JainMgcpResponseEvent responseEvent
| Constructor Detail |
|---|
public TransactionHandler(JainMgcpStackImpl stack)
stack - the reference to the MGCP stack.
public TransactionHandler(JainMgcpStackImpl stack,
java.net.InetAddress remoteAddress,
int port)
stack - the reference to the MGCP stack.| Method Detail |
|---|
protected void release()
public int getRemoteTID()
public int getLocalTID()
protected abstract java.lang.String encode(jain.protocol.ip.mgcp.JainMgcpCommandEvent event)
event - the command event object.
protected abstract java.lang.String encode(jain.protocol.ip.mgcp.JainMgcpResponseEvent event)
event - the response event object.
protected abstract jain.protocol.ip.mgcp.JainMgcpCommandEvent decodeCommand(java.lang.String message)
throws java.text.ParseException
MGCP - message
java.text.ParseException
protected abstract jain.protocol.ip.mgcp.JainMgcpResponseEvent decodeResponse(java.lang.String message)
throws java.text.ParseException
MGCP - message
java.text.ParseExceptionpublic void run()
run in interface java.lang.Runnablepublic void receiveCommand(java.lang.String message)
message - receive MGCP command message.public void receiveResponse(java.lang.String message)
message - receive MGCP response message.protected java.lang.Object getObjectSource(int tid)
tid -
public boolean isCommand()
public void setCommand(boolean isCommand)
public void setCommandEvent(jain.protocol.ip.mgcp.JainMgcpCommandEvent commandEvent)
public void setResponseEvent(jain.protocol.ip.mgcp.JainMgcpResponseEvent responseEvent)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||