|
JAIN-SIP 2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
javax.sip.ResponseEvent
public class ResponseEvent
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:
Constructor Summary | |
---|---|
ResponseEvent(Object source,
ListeningPoint listeningPoint,
ClientTransaction clientTransaction,
Dialog dialog,
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 |
Dialog |
getDialog()
Gets the Dialog associated with the event or null if no dialog exists. |
ListeningPoint |
getListeningPoint()
Get the listening point over which this response was receieved. |
ClientTransaction |
getOriginalTransaction()
Get the original transaction for which this is a forked response. |
String |
getRemoteIpAddress()
Get the remote IP addr. from which request was received. |
int |
getRemotePort()
Get the remote port from which response was received. |
Response |
getResponse()
Gets the Response message encapsulated in this ResponseEvent. |
boolean |
isForkedResponse()
Return true if this is a forked response. |
void |
setForkedResponse(boolean forked)
Set true if this is a forked response. |
void |
setOriginalTransaction(ClientTransaction originalTransaction)
Set the original transaction for a forked response. |
void |
setRemoteIpAddress(String remoteIpAddress)
Set the remote IP addr. from which request was received. |
void |
setRemotePort(int remotePort)
Set the remote port from which response was received. |
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 |
---|
public ResponseEvent(Object source, ListeningPoint listeningPoint, ClientTransaction clientTransaction, Dialog dialog, Response response)
SipListener.processResponse(ResponseEvent)
method of the SipListener
for application processing.
source
- - the source of ResponseEvent i.e. the SipProviderlisteningPoint
- - the listening point over which the response was received by the stack.clientTransaction
- - client transaction upon which
this Response was sentresponse
- - the Response message received by the SipProviderMethod Detail |
---|
public ClientTransaction getClientTransaction()
public Response getResponse()
public Dialog getDialog()
public void setForkedResponse(boolean forked)
forked
- - a boolean that is set in the response event indicating
that the response is a forked response.public boolean isForkedResponse()
public void setOriginalTransaction(ClientTransaction originalTransaction)
originalTransaction
- - the original transaction for which this response event.
is a fork.public ClientTransaction getOriginalTransaction()
public ListeningPoint getListeningPoint()
public void setRemotePort(int remotePort)
public int getRemotePort()
public String getRemoteIpAddress()
public void setRemoteIpAddress(String remoteIpAddress)
|
JAIN-SIP 2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |