jain.protocol.ip.mgcp
Class JainMgcpEvent
java.lang.Object
|
+--java.util.EventObject
|
+--jain.protocol.ip.mgcp.JainMgcpEvent
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- JainMgcpCommandEvent, JainMgcpResponseEvent
- public abstract class JainMgcpEvent
- extends java.util.EventObject
- implements java.io.Serializable
The base class for all JAIN MGCP Events.
- See Also:
- Serialized Form
Fields inherited from class java.util.EventObject |
source |
Constructor Summary |
JainMgcpEvent(java.lang.Object source,
int objectIdentifier)
Constructs a JAIN MGCP Event object. |
Method Summary |
protected java.lang.String |
BuildListParmLine(java.lang.String parmIdentifier,
java.lang.Object[] parmList)
Creates a comma-separated text string representation of the parameters in parmList, prepended by the
parmIdentifier String, a colon (":"), and a single space character (" "), and terminated by a newline
character ("\n"). |
int |
getObjectIdentifier()
Returns an integer value that identifies this event object as a specific JAIN MGCP Command or Response event. |
int |
getTransactionHandle()
Gets the transaction handle that associates a Response Event with
the Command Event that elicited it. |
void |
setTransactionHandle(int transactionHandle)
Sets the transaction handle that associates a Response Event with
the Command Event that elicited it. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
JainMgcpEvent
public JainMgcpEvent(java.lang.Object source,
int objectIdentifier)
- Constructs a JAIN MGCP Event object.
- Parameters:
source
- A reference to the object, the "source", that is logically deemed to be
the object upon which the Event in question initially occurred.objectIdentifier
- An integer value that identifies the Command or Response event object that is being constructed.
See jain.protocol.ip.mgcp.message.Constants
for the definition of the
constants for the Command and Response events.
BuildListParmLine
protected java.lang.String BuildListParmLine(java.lang.String parmIdentifier,
java.lang.Object[] parmList)
- Creates a comma-separated text string representation of the parameters in parmList, prepended by the
parmIdentifier String, a colon (":"), and a single space character (" "), and terminated by a newline
character ("\n").
Note: this is a protected method intended for use by the subclasses of this class that represent
MGCP command and response primitives.
- Parameters:
parmIdentifier
- The identifying String for the list of parameters (e.g., "P" for a list of connection parameters).parmList
- The list of parameters from which the return string is to be built.- Returns:
- A newline-terminated String that can be used in building an MGCP command or response message.
getObjectIdentifier
public int getObjectIdentifier()
- Returns an integer value that identifies this event object as a specific JAIN MGCP Command or Response event.
getTransactionHandle
public int getTransactionHandle()
- Gets the transaction handle that associates a Response Event with
the Command Event that elicited it.
- Returns:
- The transaction handle.
setTransactionHandle
public void setTransactionHandle(int transactionHandle)
throws java.lang.IllegalArgumentException
- Sets the transaction handle that associates a Response Event with
the Command Event that elicited it.
- Parameters:
transactionHandle
- A handle that appears in all JAIN MGCP Command and Response Event
objects. The semantics of the handle depend on the context in which
it appears.
- In a Command Event object that is sent by the application to the
JainMgcpProvider, the JainMgcpProvider will populate this parameter
with a unique value that the application can use to correlate a
subsequent Response Event object to the Command Event object.
The JainMgcpProvider will ignore whatever value this parameter is given
by the application before it is sent to the JainMgcpProvider.
- In a Command Event object that is sent by the JainMgcpProvider to
the JainMgcpListener, the JainMgcpProvider will populate this parameter
with a unique value. When the application generates a Response Event
object based on the received Command Event object, the application must
populate the
transaction handle in the Response Event object with the value it
received in the Command Event object.
- In a Response Event object that is sent by the JainMgcpProvider to
the JainMgcpListener, the JainMgcpProvider will populate this parameter
with the same value that it returned to the application in the
Command Event object that elicited this Response Event object.
- Throws:
java.lang.IllegalArgumentException
- Thrown if the transaction handle is not in the range 1 through 999999999.
Copyright © 2000 Sun Microsystems, Inc.