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

RequestEvent

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

  • source - the source of the event i.e. the SipProvider sending the RequestEvent
  • serverTransaction - the server transaction this RequestEvent is associated with.
  • Request - the Request message received on the SipProvider that needs passed to the application encapsulated in a RequestEvent.
since
v1.1

Fields Summary
private gov.nist.siplite.message.Request
m_request
Curent request.
private ServerTransaction
m_transaction
Current transaction.
Constructors Summary
public RequestEvent(Object source, ServerTransaction serverTransaction, gov.nist.siplite.message.Request request)
Constructs a RequestEvent encapsulating the Request that has been received by the underlying SipProvider. This RequestEvent once created is passed to {@link gov.nist.siplite.SipListener#processRequest(RequestEvent)} method of the SipListener for application processing.

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

        super(source);
        m_transaction = serverTransaction;
        m_request = request;
    
Methods Summary
public gov.nist.siplite.message.RequestgetRequest()
Gets the Request message associated with this RequestEvent.

return
the message associated with this RequestEvent.

        return m_request;
    
public ServerTransactiongetServerTransaction()
Gets the server transaction associated with this RequestEvent

return
the server transaction associated with this RequestEvent

        return m_transaction;