NIST SIP Parser and Stack (v1.2) API

javax.sip
Class ResponseEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.sip.ResponseEvent
All Implemented Interfaces:
Serializable

public class ResponseEvent
extends EventObject

This class represents a Response event that is passed from a SipProvider to its SipListener. This specification handles the passing of Response messages to the application with the event model. An application (SipListener) registers with the SIP protocol stack (SipProvider) and listens for Response events from the SipProvider.

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

eventType == ResponseEvent.getResponse().getStatusCode();

A Response event also encapsulates the client transaction upon which the Response is correlated, i.e. the client transaction of the Request message upon which this is a Response.

ResponseEvent contains the following elements:

Since:
v1.1
Author:
Sun Microsystems
See Also:
Serialized Form

Constructor Summary
ResponseEvent(Object source, ClientTransaction clientTransaction, Response response)
          Constructs a ResponseEvent encapsulating the Response that has been received by the underlying SipProvider.
 
Method Summary
 ClientTransaction getClientTransaction()
          Gets the client transaction associated with this ResponseEvent
 Response getResponse()
          Gets the Response message encapsulated in this ResponseEvent.
 
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

ResponseEvent

public ResponseEvent(Object source,
                     ClientTransaction clientTransaction,
                     Response response)
Constructs a ResponseEvent encapsulating the Response that has been received by the underlying SipProvider. This ResponseEvent once created is passed to SipListener.processResponse(ResponseEvent) method of the SipListener for application processing.

Parameters:
source - - the source of ResponseEvent i.e. the SipProvider
clientTransaction - - client transaction upon which this Response was sent
response - - the Response message received by the SipProvider
Method Detail

getClientTransaction

public ClientTransaction getClientTransaction()
Gets the client transaction associated with this ResponseEvent

Returns:
client transaction associated with this ResponseEvent

getResponse

public Response getResponse()
Gets the Response message encapsulated in this ResponseEvent.

Returns:
the response associated with this ResponseEvent.

NIST SIP Parser and Stack (v1.2) API

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Get the latest distribution.
Submit a bug report or feature request.