|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.protocols.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 jain.protocol.ip.mgcp.message.parms.EndpointIdentifier |
endpoint
|
static int |
LONGTRAN_TIMER_TIMEOUT
|
static String |
MGCP_VERSION
|
static String |
NEW_LINE
|
protected int |
remoteTID
Transaction handle sent from application to the MGCP provider. |
protected jain.protocol.ip.mgcp.JainMgcpResponseEvent |
responseEvent
Used to hold parsed response event * |
protected boolean |
retransmision
|
protected boolean |
sent
Is this a transaction on a command sent or received? |
static String |
SINGLE_CHAR_SPACE
|
protected Object |
source
|
protected JainMgcpStackImpl |
stack
|
static int |
THIST_TIMER_TIMEOUT
|
protected static Timer |
transactionHandlerTimer
Expiration timer |
protected UtilsFactory |
utilsFactory
|
| 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,
InetAddress remoteAddress,
int port)
Creates a new instance of TransactionHandle. |
|
| Method Summary | |
|---|---|
abstract jain.protocol.ip.mgcp.JainMgcpCommandEvent |
decodeCommand(String msg)
Decodes MGCP command message into jain mgcp command event object. |
abstract jain.protocol.ip.mgcp.JainMgcpResponseEvent |
decodeResponse(String message)
Decodes MGCP response message into jain mgcp response event object. |
abstract String |
encode(jain.protocol.ip.mgcp.JainMgcpCommandEvent event)
Encodes command event object into MGCP command message. |
abstract String |
encode(jain.protocol.ip.mgcp.JainMgcpResponseEvent event)
Encodes response event object into MGCP response message. |
String |
getEndpointId()
|
int |
getLocalTID()
Returns the transaction handle sent from MGCP provider to listener. |
protected Object |
getObjectSource(int tid)
constructs the object source for a command |
abstract jain.protocol.ip.mgcp.JainMgcpResponseEvent |
getProvisionalResponse()
|
int |
getRemoteTID()
Returns the transaction handle sent from application to the MGCP provider. |
boolean |
isCommand()
|
void |
markRetransmision()
|
void |
receiveRequest(jain.protocol.ip.mgcp.message.parms.EndpointIdentifier endpoint,
String msg,
Integer remoteTID)
|
void |
receiveResponse(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()
|
protected void |
sendProvisionalResponse()
|
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 String NEW_LINE
public static final String SINGLE_CHAR_SPACE
public static final String MGCP_VERSION
public static final int LONGTRAN_TIMER_TIMEOUT
public static final int THIST_TIMER_TIMEOUT
protected boolean sent
protected int remoteTID
protected JainMgcpStackImpl stack
protected jain.protocol.ip.mgcp.JainMgcpCommandEvent commandEvent
protected jain.protocol.ip.mgcp.JainMgcpResponseEvent responseEvent
protected static Timer transactionHandlerTimer
protected UtilsFactory utilsFactory
protected boolean retransmision
protected Object source
protected jain.protocol.ip.mgcp.message.parms.EndpointIdentifier endpoint
| Constructor Detail |
|---|
public TransactionHandler(JainMgcpStackImpl stack)
stack - the reference to the MGCP stack.
public TransactionHandler(JainMgcpStackImpl stack,
InetAddress remoteAddress,
int port)
stack - the reference to the MGCP stack.| Method Detail |
|---|
protected void release()
public int getRemoteTID()
public int getLocalTID()
public abstract String encode(jain.protocol.ip.mgcp.JainMgcpCommandEvent event)
event - the command event object.
public abstract String encode(jain.protocol.ip.mgcp.JainMgcpResponseEvent event)
event - the response event object.
public abstract jain.protocol.ip.mgcp.JainMgcpCommandEvent decodeCommand(String msg)
throws ParseException
MGCP - message
ParseException
public abstract jain.protocol.ip.mgcp.JainMgcpResponseEvent decodeResponse(String message)
throws ParseException
MGCP - message
ParseExceptionpublic abstract jain.protocol.ip.mgcp.JainMgcpResponseEvent getProvisionalResponse()
public void run()
run in interface Runnableprotected void sendProvisionalResponse()
protected 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)
public void markRetransmision()
public void receiveRequest(jain.protocol.ip.mgcp.message.parms.EndpointIdentifier endpoint,
String msg,
Integer remoteTID)
public void receiveResponse(String message)
message - receive MGCP response message.public String getEndpointId()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||