|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.cafesip.sipunit.SipMessage
org.cafesip.sipunit.SipRequest
public class SipRequest
The SipRequest class provides high level getter methods for a request received from the network. It is primarily used for SipTestCase assertions dealing with SIP message body and headers. The test program passes this object to these assert methods. The test program can obtain this object by calling the getLastReceivedRequest() or getAllReceivedRequests() on the MessageListener object (such as SipCall or Subscription) when using the high-level API or it can create this object using the RequestEvent/request object returned by a waitXyz() method (such as SipSession.waitRequest()) when using the low-level SipUnit API. A test program may call this object's getMessage() method to get the underlying javax.sip.message.Message object or call getRequestEvent() to get the associated javax.sip.RequestEvent which provides access to related JAIN-SIP objects such ServerTransaction, Dialog, etc. Knowledge of JAIN SIP API is required at this level.
| Field Summary | |
|---|---|
static java.lang.String |
ACK
|
static java.lang.String |
BYE
|
static java.lang.String |
CANCEL
|
static java.lang.String |
INFO
|
static java.lang.String |
INVITE
Request methods ********** |
static java.lang.String |
MESSAGE
|
static java.lang.String |
NOTIFY
|
static java.lang.String |
OPTIONS
|
static java.lang.String |
PRACK
|
static java.lang.String |
REFER
|
static java.lang.String |
REGISTER
|
static java.lang.String |
SUBSCRIBE
|
static java.lang.String |
UPDATE
|
| Constructor Summary | |
|---|---|
SipRequest(javax.sip.message.Request request)
A constructor for this class, applicable when using the low-level SipUnit API. |
|
SipRequest(javax.sip.RequestEvent event)
A constructor for this class used by SipUnit classes such as SipCall and Subscription to save the request event information so that the test program can get JAIN-SIP objects from it, if needed - ServerTransaction, Dialog, etc. |
|
| Method Summary | |
|---|---|
javax.sip.RequestEvent |
getRequestEvent()
Use this method if you need the JAIN-SIP request event associated with a request received by high level SipUnit classes like SipCall and Subscription. |
java.lang.String |
getRequestURI()
Returns the request URI line of the request message or an empty string if there isn't one. |
boolean |
isAck()
Indicates if the request method is ACK or not. |
boolean |
isBye()
Indicates if the request method is BYE or not. |
boolean |
isInvite()
Indicates if the request method is INVITE or not. |
boolean |
isNotify()
Indicates if the request method is NOTIFY or not. |
boolean |
isSipURI()
Indicates if the request URI in the request message is a URI with a scheme of "sip" or "sips". |
boolean |
isSubscribe()
Indicates if the request method is SUBSCRIBE or not. |
void |
setRequestEvent(javax.sip.RequestEvent requestEvent)
A setter for the request event. |
| Methods inherited from class org.cafesip.sipunit.SipMessage |
|---|
getContent, getContentLength, getExpiry, getMessage, getRawContent, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String INVITE
public static final java.lang.String ACK
public static final java.lang.String BYE
public static final java.lang.String CANCEL
public static final java.lang.String INFO
public static final java.lang.String MESSAGE
public static final java.lang.String NOTIFY
public static final java.lang.String OPTIONS
public static final java.lang.String PRACK
public static final java.lang.String REFER
public static final java.lang.String REGISTER
public static final java.lang.String SUBSCRIBE
public static final java.lang.String UPDATE
| Constructor Detail |
|---|
public SipRequest(javax.sip.message.Request request)
request - the Request contained within the RequestEvent object returned
by SipSession.waitRequest()public SipRequest(javax.sip.RequestEvent event)
event - | Method Detail |
|---|
public java.lang.String getRequestURI()
public boolean isSipURI()
public boolean isInvite()
public boolean isAck()
public boolean isBye()
public boolean isNotify()
public boolean isSubscribe()
public javax.sip.RequestEvent getRequestEvent()
public void setRequestEvent(javax.sip.RequestEvent requestEvent)
requestEvent - The requestEvent to set.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||