|
||||||||||
| 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:
| Nested Class Summary | |
|---|---|
protected class |
TransactionHandler.ActionPerform
|
protected class |
TransactionHandler.ScheduleCommandSend
|
protected class |
TransactionHandler.ScheduleRequestReceival
|
protected class |
TransactionHandler.ScheduleResponseReceival
|
| Field Summary | |
|---|---|
protected java.util.LinkedList<TransactionHandler.ActionPerform> |
actionToPerform
|
protected jain.protocol.ip.mgcp.JainMgcpCommandEvent |
commandEvent
Used to hold parsed command event |
protected EndpointHandler |
endpointHandler
|
static int |
LONGTRAN_TIMER_TIMEOUT
|
static java.lang.String |
MGCP_VERSION
|
static java.lang.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 java.lang.String |
SINGLE_CHAR_SPACE
|
protected java.lang.Object |
source
|
protected JainMgcpStackImpl |
stack
|
static int |
THIST_TIMER_TIMEOUT
|
protected static java.util.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,
java.net.InetAddress remoteAddress,
int port)
Creates a new instance of TransactionHandle. |
|
| Method Summary | |
|---|---|
void |
clearEndpointHandler()
|
abstract jain.protocol.ip.mgcp.JainMgcpCommandEvent |
decodeCommand(java.lang.String message)
Decodes MGCP command message into jain mgcp command event object. |
abstract jain.protocol.ip.mgcp.JainMgcpResponseEvent |
decodeResponse(java.lang.String message)
Decodes MGCP response message into jain mgcp response event object. |
abstract java.lang.String |
encode(jain.protocol.ip.mgcp.JainMgcpCommandEvent event)
Encodes command event object into MGCP command message. |
abstract java.lang.String |
encode(jain.protocol.ip.mgcp.JainMgcpResponseEvent event)
Encodes response event object into MGCP response message. |
EndpointHandler |
getEndpointHandler()
|
java.lang.String |
getEndpointId()
|
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 |
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(java.lang.String msg)
|
void |
receiveResponse(java.lang.String message)
Used by stack for relaying received MGCP response messages to the application. |
protected void |
release(boolean removeEndpointHandler)
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 |
setEndpointHandler(EndpointHandler handler)
|
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 java.lang.String NEW_LINE
public static final java.lang.String SINGLE_CHAR_SPACE
public static final java.lang.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 java.util.Timer transactionHandlerTimer
protected UtilsFactory utilsFactory
protected EndpointHandler endpointHandler
protected boolean retransmision
protected java.lang.Object source
protected java.util.LinkedList<TransactionHandler.ActionPerform> actionToPerform
| 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 |
|---|
public void setEndpointHandler(EndpointHandler handler)
setEndpointHandler in interface TransactionHandlerManagementpublic EndpointHandler getEndpointHandler()
protected void release(boolean removeEndpointHandler)
public void clearEndpointHandler()
clearEndpointHandler in interface TransactionHandlerManagementpublic int getRemoteTID()
public int getLocalTID()
public abstract java.lang.String encode(jain.protocol.ip.mgcp.JainMgcpCommandEvent event)
event - the command event object.
public abstract java.lang.String encode(jain.protocol.ip.mgcp.JainMgcpResponseEvent event)
event - the response event object.
public abstract jain.protocol.ip.mgcp.JainMgcpCommandEvent decodeCommand(java.lang.String message)
throws java.text.ParseException
MGCP - message
java.text.ParseException
public abstract jain.protocol.ip.mgcp.JainMgcpResponseEvent decodeResponse(java.lang.String message)
throws java.text.ParseException
MGCP - message
java.text.ParseExceptionpublic abstract jain.protocol.ip.mgcp.JainMgcpResponseEvent getProvisionalResponse()
public void run()
run in interface java.lang.Runnableprotected void sendProvisionalResponse()
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)
public void markRetransmision()
public void receiveRequest(java.lang.String msg)
public void receiveResponse(java.lang.String message)
message - receive MGCP response message.public java.lang.String getEndpointId()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||