FileDocCategorySizeDatePackage
ResponseEvent.javaAPI DocphoneME MR2 API (J2ME)4144Wed May 02 18:00:42 BST 2007gov.nist.siplite

ResponseEvent

public class ResponseEvent extends SipEvent
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 {@link ResponseEvent#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:

  • source - the source of the event i.e. the SipProvider sending the ResponseEvent.
  • clientTransaction - the client transaction this ResponseEvent is associated with.
  • Response - the Response message received on the SipProvider that needs passed to the application encapsulated in a ResponseEvent.
since
v1.1

Fields Summary
private gov.nist.siplite.message.Response
m_response
Current response to process.
private ClientTransaction
m_transaction
Current transaction.
Constructors Summary
public ResponseEvent(Object source, ClientTransaction clientTransaction, gov.nist.siplite.message.Response response)
Constructs a ResponseEvent encapsulating the Response that has been received by the underlying SipProvider. This ResponseEvent once created is passed to {@link SipListener#processResponse(ResponseEvent)} method of the SipListener for application processing.

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

        super(source);
        m_response = response;
        m_transaction = clientTransaction;
    
Methods Summary
public ClientTransactiongetClientTransaction()
Gets the client transaction associated with this ResponseEvent

return
client transaction associated with this ResponseEvent

        return m_transaction;
    
public gov.nist.siplite.message.ResponsegetResponse()
Gets the Response message encapsulated in this ResponseEvent.

return
the response associated with this ResponseEvent.

        return m_response;