JAIN-SIP 2.0 API

javax.sip
Class RequestEvent

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

public class RequestEvent
extends 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:

Since:
1.1
Version:
2.0
Author:
Oracle Inc., NIST
See Also:
Serialized Form

Constructor Summary
RequestEvent(Object source, ListeningPoint listeningPoint, 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.
 ListeningPoint getListeningPoint()
          Get the listening point over which the request was received.
 String getRemoteIpAddress()
           
 int getRemotePort()
           
 Request getRequest()
          Gets the Request message associated with this RequestEvent.
 ServerTransaction getServerTransaction()
          Gets the server transaction associated with this RequestEvent
 void setRemoteIpAddress(String remoteIpAddress)
          Set the remote IP address.
 void setRemotePort(int remotePort)
           
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RequestEvent

public RequestEvent(Object source,
                    ListeningPoint listeningPoint,
                    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

getListeningPoint

public ListeningPoint getListeningPoint()
Get the listening point over which the request was received.

Returns:
- the listening point over which the request was received.

setRemoteIpAddress

public void setRemoteIpAddress(String remoteIpAddress)
Set the remote IP address. This method is only for use by implementations.

Since:
2.0

getRemoteIpAddress

public String getRemoteIpAddress()

setRemotePort

public void setRemotePort(int remotePort)

getRemotePort

public int getRemotePort()

JAIN-SIP 2.0 API


See conditions of use.
Submit a bug report or feature request.