gov.nist.javax.sip.message
クラス SIPResponse

java.lang.Object
  上位を拡張 gov.nist.core.GenericObject
      上位を拡張 gov.nist.javax.sip.message.MessageObject
          上位を拡張 gov.nist.javax.sip.message.SIPMessage
              上位を拡張 gov.nist.javax.sip.message.SIPResponse
すべての実装されたインタフェース:
java.io.Serializable, java.lang.Cloneable, javax.sip.message.Message, javax.sip.message.Response

public final class SIPResponse
extends SIPMessage
implements javax.sip.message.Response

SIP Response structure.

バージョン:
JAIN-SIP-1.1 $Revision: 1.6 $ $Date: 2004/09/09 16:49:07 $
作成者:
M. Ranganathan
This code is in the public domain.
関連項目:
直列化された形式

フィールドの概要
 
インタフェース javax.sip.message.Response から継承されたフィールド
ACCEPTED, ADDRESS_INCOMPLETE, ALTERNATIVE_SERVICE, AMBIGUOUS, BAD_EVENT, BAD_EXTENSION, BAD_GATEWAY, BAD_REQUEST, BUSY_EVERYWHERE, BUSY_HERE, CALL_IS_BEING_FORWARDED, CALL_OR_TRANSACTION_DOES_NOT_EXIST, DECLINE, DOES_NOT_EXIST_ANYWHERE, EXTENSION_REQUIRED, FORBIDDEN, GONE, INTERVAL_TOO_BRIEF, LOOP_DETECTED, MESSAGE_TOO_LARGE, METHOD_NOT_ALLOWED, MOVED_PERMANENTLY, MOVED_TEMPORARILY, MULTIPLE_CHOICES, NOT_ACCEPTABLE, NOT_ACCEPTABLE_HERE, NOT_FOUND, NOT_IMPLEMENTED, OK, PAYMENT_REQUIRED, PROXY_AUTHENTICATION_REQUIRED, QUEUED, REQUEST_ENTITY_TOO_LARGE, REQUEST_PENDING, REQUEST_TERMINATED, REQUEST_TIMEOUT, REQUEST_URI_TOO_LONG, RINGING, SERVER_INTERNAL_ERROR, SERVER_TIMEOUT, SERVICE_UNAVAILABLE, SESSION_NOT_ACCEPTABLE, SESSION_PROGRESS, TEMPORARILY_UNAVAILABLE, TOO_MANY_HOPS, TRYING, UNAUTHORIZED, UNDECIPHERABLE, UNSUPPORTED_MEDIA_TYPE, UNSUPPORTED_URI_SCHEME, USE_PROXY, VERSION_NOT_SUPPORTED
 
コンストラクタの概要
SIPResponse()
          Constructor.
 
メソッドの概要
 java.lang.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.
 java.lang.String debugDump()
          Print formatting function.
 java.lang.String encode()
          Encode the SIP Request as a string.
 byte[] encodeAsBytes()
          Encode this into a byte array.
 java.lang.String encodeMessage()
          Encode the message except for the body.
 boolean equals(java.lang.Object other)
          Compare for equality.
 java.lang.String getDialogId(boolean isServer)
          Get a dialog identifier.
 java.lang.String getDialogId(boolean isServer, java.lang.String toTag)
           
 java.lang.String getFirstLine()
          Get the encoded first line.
 java.util.LinkedList getMessageAsEncodedStrings()
          Get this message as a list of encoded strings.
 java.lang.String getReasonPhrase()
          Get the reason phrase.
static java.lang.String getReasonPhrase(int rc)
           
 java.lang.String getSIPVersion()
           
 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(java.lang.Object matchObj)
          Match with a template.
 void replace(java.lang.String cText, GenericObject newObj, boolean matchSubstring)
          Replace a portion of this response with a new structure (given by newObj).
 void setReasonPhrase(java.lang.String reasonPhrase)
          Set the reason phrase.
 void setSIPVersion(java.lang.String sipVersion)
           
 void setStatusCode(int statusCode)
          set the status code.
 void setStatusLine(StatusLine sl)
          Set the status line field.
 java.lang.String toString()
           
 
クラス gov.nist.javax.sip.message.SIPMessage から継承されたメソッド
addHeader, addHeader, addUnparsed, attachHeader, attachHeader, getAuthorization, getCallId, getContactHeaders, getContent, getContentDisposition, getContentEncoding, getContentLanguage, getContentLength, getContentTypeHeader, getCSeq, getErrorInfoHeaders, getExpires, getFrom, getFromTag, getHeader, getHeaderNames, getHeaders, getHeaders, getMaxForwards, getMessageContent, getRawContent, getRecordRouteHeaders, getRouteHeaders, getSize, getTo, getTopmostVia, getToTag, getTransactionId, getUnrecognizedHeaders, getUserObject, getViaHeaders, hasContent, hasFromTag, hasHeader, hasToTag, isRequestHeader, isResponseHeader, merge, removeContent, removeHeader, removeHeader, replace, setCallId, setCallId, setContent, setContentDisposition, setContentEncoding, setContentLanguage, setContentLength, setCSeq, setExpires, setFrom, setFromTag, setHeader, setHeader, setHeaders, setMaxForwards, setMessageContent, setMessageContent, setMessageContent, setMessageContent, setSize, setTo, setToTag, setUserObject, setVia
 
クラス gov.nist.javax.sip.message.MessageObject から継承されたメソッド
dbgPrint, dbgPrint
 
クラス gov.nist.core.GenericObject から継承されたメソッド
debugDump, getClassFromName, getMatcher, isMySubclass, replace, replace, setMatcher
 
クラス java.lang.Object から継承されたメソッド
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
インタフェース javax.sip.message.Message から継承されたメソッド
addHeader, getContent, getContentDisposition, getContentEncoding, getContentLanguage, getContentLength, getExpires, getHeader, getHeaderNames, getHeaders, getRawContent, getUnrecognizedHeaders, getUserObject, removeContent, removeHeader, setContent, setContentDisposition, setContentEncoding, setContentLanguage, setContentLength, setExpires, setHeader, setUserObject
 

コンストラクタの詳細

SIPResponse

public SIPResponse()
Constructor.

メソッドの詳細

getReasonPhrase

public static java.lang.String getReasonPhrase(int rc)

setStatusCode

public void setStatusCode(int statusCode)
                   throws java.text.ParseException
set the status code.

定義:
インタフェース javax.sip.message.Response 内の setStatusCode
パラメータ:
statusCode - is the status code to set.
例外:
IlegalArgumentException - if invalid status code.
java.text.ParseException

getStatusLine

public StatusLine getStatusLine()
Get the status line of the response.

戻り値:
StatusLine

getStatusCode

public int getStatusCode()
Get the staus code (conveniance function).

定義:
インタフェース javax.sip.message.Response 内の getStatusCode
戻り値:
the status code of the status line.

setReasonPhrase

public void setReasonPhrase(java.lang.String reasonPhrase)
Set the reason phrase.

定義:
インタフェース javax.sip.message.Response 内の setReasonPhrase
パラメータ:
reasonPhrase - the reason phrase.
例外:
java.lang.IllegalArgumentException - if null string

getReasonPhrase

public java.lang.String getReasonPhrase()
Get the reason phrase.

定義:
インタフェース javax.sip.message.Response 内の getReasonPhrase
戻り値:
the reason phrase.

isFinalResponse

public static boolean isFinalResponse(int rc)
Return true if the response is a final response.

パラメータ:
rc - is the return code.
戻り値:
true if the parameter is between the range 200 and 700.

isFinalResponse

public boolean isFinalResponse()
Is this a final response?

戻り値:
true if this is a final response.

setStatusLine

public void setStatusLine(StatusLine sl)
Set the status line field.

パラメータ:
sl - Status line to set.

debugDump

public java.lang.String debugDump()
Print formatting function. Indent and parenthesize for pretty printing. Note -- use the encode method for formatting the message. Hack here to XMLize.

オーバーライド:
クラス SIPMessage 内の debugDump
戻り値:
a string for pretty printing.

encode

public java.lang.String encode()
Encode the SIP Request as a string.

オーバーライド:
クラス SIPMessage 内の encode
戻り値:
The string encoded canonical form of the message.

encodeMessage

public java.lang.String encodeMessage()
Encode the message except for the body.

定義:
クラス SIPMessage 内の encodeMessage
戻り値:
The string except for the body.

getMessageAsEncodedStrings

public java.util.LinkedList getMessageAsEncodedStrings()
Get this message as a list of encoded strings.

オーバーライド:
クラス SIPMessage 内の getMessageAsEncodedStrings
戻り値:
LinkedList containing encoded strings for each header in the message.

clone

public java.lang.Object clone()
Make a clone (deep copy) of this object.

定義:
インタフェース javax.sip.message.Message 内の clone
オーバーライド:
クラス SIPMessage 内の clone
戻り値:
a deep copy of this object.

replace

public void replace(java.lang.String cText,
                    GenericObject newObj,
                    boolean matchSubstring)
Replace a portion of this response with a new structure (given by newObj). This method finds a sub-structure that encodes to cText and has the same type as the second arguement and replaces this portion with the second argument.

オーバーライド:
クラス SIPMessage 内の replace
パラメータ:
cText - is the text that we want to replace.
newObj - is the new object that we want to put in place of cText.
matchSubstring - boolean to indicate whether to match on substrings when searching for a replacement.

equals

public boolean equals(java.lang.Object other)
Compare for equality.

定義:
インタフェース javax.sip.message.Message 内の equals
オーバーライド:
クラス SIPMessage 内の equals
パラメータ:
other - other object to compare with.
戻り値:
true if the objects are euqal and false otherwise

match

public boolean match(java.lang.Object matchObj)
Match with a template.

オーバーライド:
クラス SIPMessage 内の match
パラメータ:
matchObj - template object to match ourselves with (null in any position in the template object matches wildcard)
戻り値:
true if a match occured and false otherwise.

encodeAsBytes

public byte[] encodeAsBytes()
Encode this into a byte array. This is used when the body has been set as a binary array and you want to encode the body as a byte array for transmission.

オーバーライド:
クラス SIPMessage 内の encodeAsBytes
戻り値:
a byte array containing the SIPRequest encoded as a byte array.

getDialogId

public java.lang.String getDialogId(boolean isServer)
Get a dialog identifier. Generates a string that can be used as a dialog identifier.

定義:
クラス SIPMessage 内の getDialogId
パラメータ:
isServer - is set to true if this is the UAS and set to false if this is the UAC

getDialogId

public java.lang.String getDialogId(boolean isServer,
                                    java.lang.String toTag)

createRequest

public SIPRequest createRequest(SipUri requestURI,
                                Via via,
                                CSeq cseq)
Create a new SIPRequest from the given response. Note that the RecordRoute Via and CSeq headers are not copied from the response. These have to be added by the caller. This method is useful for generating ACK messages from final responses.

パラメータ:
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.

getFirstLine

public java.lang.String getFirstLine()
Get the encoded first line.

定義:
クラス SIPMessage 内の getFirstLine
戻り値:
the status line encoded.

setSIPVersion

public void setSIPVersion(java.lang.String sipVersion)
定義:
インタフェース javax.sip.message.Message 内の setSIPVersion
定義:
クラス SIPMessage 内の setSIPVersion

getSIPVersion

public java.lang.String getSIPVersion()
定義:
インタフェース javax.sip.message.Message 内の getSIPVersion
定義:
クラス SIPMessage 内の getSIPVersion

toString

public java.lang.String toString()
定義:
インタフェース javax.sip.message.Message 内の toString
定義:
クラス SIPMessage 内の toString