JSIP API v1.2
November 2006

javax.sip
Class RequestEvent

java.lang.Object
  extended by java.util.EventObject
      extended by javax.sip.RequestEvent
All Implemented Interfaces:
java.io.Serializable

public class RequestEvent
extends java.util.EventObject

This class represents an Request event that is passed from a SipProvider to its SipListener. This specification handles the passing of request messages to the application use the event model. An application (SipListener) will register with the SIP protocol stack (SipProvider) and listen for Request events from the SipProvider.

This specification defines a single Request event object to handle all Request messages. The Request event encapsulates the Request message that can be retrieved from getRequest(). Therefore the event type of a Request event can be determined as follows:

eventType == RequestEvent.getRequest().getMethod();

A Request event also encapsulates the server transaction which handles the Request.

RequestEvent contains the following elements:

Author:
BEA Systems, NIST
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
RequestEvent(java.lang.Object source, ServerTransaction serverTransaction, Dialog dialog, Request request)
          Constructs a RequestEvent encapsulating the Request that has been received by the underlying SipProvider.
 
Method Summary
 Dialog getDialog()
          Gets the dialog with which this Event is associated.
 Request getRequest()
          Gets the Request message associated with this RequestEvent.
 ServerTransaction getServerTransaction()
          Gets the server transaction associated with this RequestEvent
 
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

RequestEvent

public RequestEvent(java.lang.Object source,
                    ServerTransaction serverTransaction,
                    Dialog dialog,
                    Request request)
Constructs a RequestEvent encapsulating the Request that has been received by the underlying SipProvider. This RequestEvent once created is passed to SipListener.processRequest(RequestEvent) method of the SipListener for application processing.

Parameters:
source - - the source of ResponseEvent i.e. the SipProvider
serverTransaction - - server transaction upon which this Request was sent
request - - the Request message received by the SipProvider
Method Detail

getServerTransaction

public ServerTransaction getServerTransaction()
Gets the server transaction associated with this RequestEvent

Returns:
the server transaction associated with this RequestEvent

getRequest

public Request getRequest()
Gets the Request message associated with this RequestEvent.

Returns:
the message associated with this RequestEvent.

getDialog

public Dialog getDialog()
Gets the dialog with which this Event is associated. This method separates transaction support from dialog support. This enables application developers to access the dialog associated to this event without having to query the transaction associated to the event.

Returns:
the dialog with which the RequestEvent is associated or null if no dialog exists.
Since:
v1.2

JSIP API v1.2
November 2006

If you have any comments, please mail them to JAIN-SIP-INTEREST@java.sun.com after subscribing at http://archives.java.sun.com
Copyright - 2006 BEA Systems and Sun Microsystems