JAINTM MGCP API (DRAFT FOR PUBLIC REVIEW) - Version 0.9 - 16 NOVEMBER 2000

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
 

Constructor Detail

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.
Method Detail

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.
  1. 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.
  2. 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.
  3. 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.

JAINTM MGCP API (DRAFT FOR PUBLIC REVIEW) - Version 0.9 - 16 NOVEMBER 2000

Copyright © 2000 Sun Microsystems, Inc.