|
NIST-SIP: The Reference Implementation for JAIN-SIP 1.2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectgov.nist.core.GenericObject
gov.nist.javax.sip.message.MessageObject
gov.nist.javax.sip.message.SIPMessage
gov.nist.javax.sip.message.SIPResponse
SIP Response structure.
| Field Summary |
| Constructor Summary | |
SIPResponse()
Constructor. |
|
| Method Summary | |
void |
checkHeaders()
Check the response structure. |
Object |
clone()
Make a clone (deep copy) of this object. |
SIPRequest |
createRequest(SipUri requestURI,
Via via,
CSeq cseq)
Create a new SIPRequest from the given response. |
SIPRequest |
createRequest(SipUri requestURI,
Via via,
CSeq cseq,
From from,
To to)
Generate a request from a response. |
String |
debugDump()
Print formatting function. |
String |
encode()
Encode the SIP Request as a string. |
byte[] |
encodeAsBytes()
Encode this into a byte array. |
String |
encodeMessage()
Encode the message except for the body. |
boolean |
equals(Object other)
Compare for equality. |
String |
getDialogId(boolean isServer)
Get a dialog identifier. |
String |
getDialogId(boolean isServer,
String toTag)
|
String |
getFirstLine()
Get the encoded first line. |
LinkedList |
getMessageAsEncodedStrings()
Get this message as a list of encoded strings. |
String |
getReasonPhrase()
Get the reason phrase. |
static String |
getReasonPhrase(int rc)
|
String |
getSIPVersion()
Gets the protocol version of SIP being used by this Message. |
int |
getStatusCode()
Get the staus code (conveniance function). |
StatusLine |
getStatusLine()
Get the status line of the response. |
boolean |
isFinalResponse()
Is this a final response? |
static boolean |
isFinalResponse(int rc)
Return true if the response is a final response. |
boolean |
match(Object matchObj)
Match with a template. |
void |
setReasonPhrase(String reasonPhrase)
Set the reason phrase. |
void |
setSIPVersion(String sipVersion)
Sets the protocol version of SIP being used by this Message. |
void |
setStatusCode(int statusCode)
set the status code. |
void |
setStatusLine(StatusLine sl)
Set the status line field. |
String |
toString()
Gets string representation of Message |
| Methods inherited from class gov.nist.javax.sip.message.MessageObject |
dbgPrint, dbgPrint |
| Methods inherited from class gov.nist.core.GenericObject |
debugDump, getClassFromName, getMatcher, isMySubclass, makeClone, setMatcher |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.sip.message.Message |
addFirst, addHeader, addLast, getContent, getContentDisposition, getContentEncoding, getContentLanguage, getContentLength, getExpires, getHeader, getHeaderNames, getHeaders, getRawContent, getUnrecognizedHeaders, hashCode, removeContent, removeFirst, removeHeader, removeLast, setContent, setContentDisposition, setContentEncoding, setContentLanguage, setContentLength, setExpires, setHeader |
| Constructor Detail |
public SIPResponse()
| Method Detail |
public static String getReasonPhrase(int rc)
public void setStatusCode(int statusCode)
throws ParseException
setStatusCode in interface ResponsestatusCode - is the status code to set.
IlegalArgumentException - if invalid status code.
ParseException - which signals that an error has been reached
unexpectedly while parsing the statusCode value.public StatusLine getStatusLine()
public int getStatusCode()
getStatusCode in interface Responsepublic void setReasonPhrase(String reasonPhrase)
setReasonPhrase in interface ResponsereasonPhrase - the reason phrase.
IllegalArgumentException - if null stringpublic String getReasonPhrase()
getReasonPhrase in interface Responsepublic static boolean isFinalResponse(int rc)
rc - is the return code.
public boolean isFinalResponse()
public void setStatusLine(StatusLine sl)
sl - Status line to set.public String debugDump()
debugDump in class SIPMessage
public void checkHeaders()
throws ParseException
ParseExceptionpublic String encode()
encode in class SIPMessagepublic String encodeMessage()
encodeMessage in class SIPMessagepublic LinkedList getMessageAsEncodedStrings()
getMessageAsEncodedStrings in class SIPMessagepublic Object clone()
clone in interface Messageclone in class SIPMessagepublic boolean equals(Object other)
equals in interface Messageequals in class SIPMessageother - other object to compare with.public boolean match(Object matchObj)
match in class SIPMessagematchObj - template object to match ourselves with (null
in any position in the template object matches wildcard)
public byte[] encodeAsBytes()
encodeAsBytes in class SIPMessagepublic String getDialogId(boolean isServer)
getDialogId in class SIPMessageisServer - is set to true if this is the UAS
and set to false if this is the UAC
public String getDialogId(boolean isServer,
String toTag)
public SIPRequest createRequest(SipUri requestURI,
Via via,
CSeq cseq)
requestURI - is the request URI to use.via - is the via header to use.cseq - is the cseq header to use in the generated
request.public String getFirstLine()
getFirstLine in class SIPMessagepublic void setSIPVersion(String sipVersion)
Message
setSIPVersion in interface MessagesetSIPVersion in class SIPMessagepublic String getSIPVersion()
Message
getSIPVersion in interface MessagegetSIPVersion in class SIPMessagepublic String toString()
Message
toString in interface MessagetoString in class SIPMessage
public SIPRequest createRequest(SipUri requestURI,
Via via,
CSeq cseq,
From from,
To to)
requestURI - -- the request URI to assign to the request.via - -- the Via header to assign to the requestcseq - -- the CSeq header to assign to the requestfrom - -- the From header to assign to the requestto - -- the To header to assign to the request
|
NIST-SIP: The Reference Implementation for JAIN-SIP 1.2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||