|
||||||||||
| 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 |
protected JainMgcpStackImpl |
stack
|
static int |
TIMEOUT
|
| 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. |
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 |
send(jain.protocol.ip.mgcp.JainMgcpCommandEvent event)
Sends MGCP command from the application to the endpoint specified in the message. |
void |
send(jain.protocol.ip.mgcp.JainMgcpResponseEvent event)
Sends MGCP response message from the application to the host from wich origination command was received. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TIMEOUT
protected JainMgcpStackImpl stack
protected jain.protocol.ip.mgcp.JainMgcpCommandEvent commandEvent
| 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 send(jain.protocol.ip.mgcp.JainMgcpCommandEvent event)
event - the jain mgcp command event object.public void send(jain.protocol.ip.mgcp.JainMgcpResponseEvent event)
event - the jain mgcp response event object.public 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 -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||