|
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
public final class 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,
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(String transport)
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, encode, 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 Response
statusCode
- 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 Response
public void setReasonPhrase(String reasonPhrase)
setReasonPhrase
in interface Response
reasonPhrase
- the reason phrase.
IllegalArgumentException
- if null stringpublic String getReasonPhrase()
getReasonPhrase
in interface Response
public 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
ParseException
public String encode()
encode
in class SIPMessage
public String encodeMessage()
encodeMessage
in class SIPMessage
public LinkedList getMessageAsEncodedStrings()
getMessageAsEncodedStrings
in class SIPMessage
public Object clone()
clone
in interface Message
clone
in class SIPMessage
public boolean equals(Object other)
equals
in interface Message
equals
in class SIPMessage
other
- other object to compare with.
public boolean match(Object matchObj)
match
in class SIPMessage
matchObj
- template object to match ourselves with (null
in any position in the template object matches wildcard)
public byte[] encodeAsBytes(String transport)
encodeAsBytes
in class SIPMessage
public String getDialogId(boolean isServer)
getDialogId
in class SIPMessage
isServer
- is set to true if this is the UAS
and set to false if this is the UACpublic String getDialogId(boolean isServer, String toTag)
public String getFirstLine()
getFirstLine
in class SIPMessage
public void setSIPVersion(String sipVersion)
Message
setSIPVersion
in interface Message
setSIPVersion
in class SIPMessage
sipVersion
- the new String object containing the version of the SIP
Protocol of this Message.public String getSIPVersion()
Message
getSIPVersion
in interface Message
getSIPVersion
in class SIPMessage
public String toString()
Message
toString
in interface Message
toString
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 |