Java Doc for Response.java in  » 6.0-JDK-Modules » j2me » gov » nist » siplite » message » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » gov.nist.siplite.message 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   gov.nist.core.GenericObject
      gov.nist.siplite.message.Message
         gov.nist.siplite.message.Response

Response
final public class Response extends Message (Code)
SIP Response structure.
version:
   JAIN-SIP-1.1
version:
   This code is in the public domain.


Field Summary
final public static  intACCEPTED
     The Acceptable extension response code signifies that the request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place.
final public static  intADDRESS_INCOMPLETE
     The server received a request with a Request-URI that was incomplete. Additional information SHOULD be provided in the reason phrase.
final public static  intALTERNATIVE_SERVICE
     The call was not successful, but alternative services are possible.
final public static  intAMBIGUOUS
     The Request-URI was ambiguous.
final public static  intBAD_EVENT
     The Bad Event extension response code is used to indicate that the server did not understand the event package specified in a "Event" header field.
final public static  intBAD_EXTENSION
     The server did not understand the protocol extension specified in a Proxy-Require or Require header field.
final public static  intBAD_GATEWAY
     The server, while acting as a gateway or proxy, received an invalid response from the downstream server it accessed in attempting to fulfill the request.
final public static  intBAD_REQUEST
     The request could not be understood due to malformed syntax.
final public static  intBUSY_EVERYWHERE
     The callee's end system was contacted successfully but the callee is busy and does not wish to take the call at this time.
final public static  intBUSY_HERE
     The callee's end system was contacted successfully, but the callee is currently not willing or able to take additional calls at this end system.
final public static  intCALL_IS_BEING_FORWARDED
     A server MAY use this status code to indicate that the call is being forwarded to a different set of destinations.
final public static  intCALL_OR_TRANSACTION_DOES_NOT_EXIST
     This status indicates that the UAS received a request that does not match any existing dialog or transaction.
final public static  intDECLINE
     The callee's machine was successfully contacted but the user explicitly does not wish to or cannot participate.
final public static  intDOES_NOT_EXIST_ANYWHERE
     The server has authoritative information that the user indicated in the Request-URI does not exist anywhere.
final public static  intEXTENSION_REQUIRED
     The UAS needs a particular extension to process the request, but this extension is not listed in a Supported header field in the request. Responses with this status code MUST contain a Require header field listing the required extensions.

A UAS SHOULD NOT use this response unless it truly cannot provide any useful service to the client.

final public static  intFORBIDDEN
     The server understood the request, but is refusing to fulfill it.
final public static  intGONE
     The requested resource is no longer available at the server and no forwarding address is known.
final public static  intINTERVAL_TOO_BRIEF
     The server is rejecting the request because the expiration time of the resource refreshed by the request is too short.
final public static  intLOOP_DETECTED
     The server has detected a loop.
final public static  intMESSAGE_TOO_LARGE
     The server was unable to process the request since the message length exceeded its capabilities.
final public static  intMETHOD_NOT_ALLOWED
     The method specified in the Request-Line is understood, but not allowed for the address identified by the Request-URI.
final public static  intMOVED_PERMANENTLY
     The user can no longer be found at the address in the Request-URI, and the requesting client SHOULD retry at the new address given by the Contact header field.
final public static  intMOVED_TEMPORARILY
     The requesting client SHOULD retry the request at the new address(es) given by the Contact header field.
final public static  intMULTIPLE_CHOICES
     The address in the request resolved to several choices, each with its own specific location, and the user (or UA) can select a preferred communication end point and redirect its request to that location.

The response MAY include a message body containing a list of resource characteristics and location(s) from which the user or UA can choose the one most appropriate, if allowed by the Accept request header field. However, no MIME types have been defined for this message body.

The choices SHOULD also be listed as Contact fields.

final public static  intNOT_ACCEPTABLE
     The resource identified by the request is only capable of generating response entities that have content characteristics not acceptable according to the Accept header field sent in the request.
final public static  intNOT_ACCEPTABLE_HERE
     The response has the same meaning as 606 (Not Acceptable), but only applies to the specific resource addressed by the Request-URI and the request may succeed elsewhere.
final public static  intNOT_FOUND
     The server has definitive information that the user does not exist at the domain specified in the Request-URI.
final public static  intNOT_IMPLEMENTED
     The server does not support the functionality required to fulfill the request.
final public static  intOK
     The request has succeeded.
final public static  intPAYMENT_REQUIRED
     Reserved for future use.
final public static  intPROXY_AUTHENTICATION_REQUIRED
     This code is similar to 401 (Unauthorized), but indicates that the client MUST first authenticate itself with the proxy.
final public static  intQUEUED
     The called party is temporarily unavailable, but the server has decided to queue the call rather than reject it.
final public static  intREQUEST_ENTITY_TOO_LARGE
     The server is refusing to process a request because the request entity-body is larger than the server is willing or able to process.
final public static  intREQUEST_PENDING
     The request was received by a UAS that had a pending request within the same dialog.
final public static  intREQUEST_TERMINATED
     The request was terminated by a BYE or CANCEL request.
final public static  intREQUEST_TIMEOUT
     The server could not produce a response within a suitable amount of time, for example, if it could not determine the location of the user in time.
final public static  intREQUEST_URI_TOO_LONG
     The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret.
final public static  intRINGING
     The User Agent receiving the INVITE is trying to alert the user.
final public static  intSERVER_INTERNAL_ERROR
     The server encountered an unexpected condition that prevented it from fulfilling the request.
final public static  intSERVER_TIMEOUT
     The server did not receive a timely response from an external server it accessed in attempting to process the request.
final public static  intSERVICE_UNAVAILABLE
     The server is temporarily unable to process the request due to a temporary overloading or maintenance of the server.
final public static  intSESSION_NOT_ACCEPTABLE
     The user's agent was contacted successfully but some aspects of the session description such as the requested media, bandwidth, or addressing style were not acceptable.
final public static  intSESSION_PROGRESS
     The 183 (Session Progress) response is used to convey information about the progress of the call that is not otherwise classified.
final public static  intTEMPORARILY_UNAVAILABLE
     The callee's end system was contacted successfully but the callee is currently unavailable (for example, is not logged in, logged in but in a state that precludes communication with the callee, or has activated the "do not disturb" feature).
final public static  intTOO_MANY_HOPS
     The server received a request that contains a Max-Forwards header field with the value zero.
final public static  intTRYING
     This response indicates that the request has been received by the next-hop server and that some unspecified action is being taken on behalf of this call (for example, a database is being consulted).
final public static  intUNAUTHORIZED
     The request requires user authentication.
final public static  intUNDECIPHERABLE
     The request was received by a UAS that contained an encrypted MIME body for which the recipient does not possess or will not provide an appropriate decryption key.
final public static  intUNSUPPORTED_MEDIA_TYPE
     The server is refusing to service the request because the message body of the request is in a format not supported by the server for the requested method.
final public static  intUNSUPPORTED_URI_SCHEME
     The server cannot process the request because the scheme of the URI in the Request-URI is unknown to the server.
final public static  intUSE_PROXY
     The requested resource MUST be accessed through the proxy given by the Contact field.
final public static  intVERSION_NOT_SUPPORTED
     The server does not support, or refuses to support, the SIP protocol version that was used in the request.
protected  StatusLinestatusLine
     The current status line.

Constructor Summary
public  Response()
     Constructor.

Method Summary
protected  voidcheckHeaders()
     Check the response structure.
public  Objectclone()
     Make a clone (deep copy) of this object.
public  RequestcreateRequest(URI requestURI, ViaHeader via, CSeqHeader cseq)
     Create a new Request from the given response.
public  Stringencode()
     Encode the SIP Request as a string.
public  byte[]encodeAsBytes()
     Encode this into a byte array.
public  booleanequals(Object other)
     Compare for equality.
Parameters:
  other - other object to compare with.
public  StringgetFirstLine()
     Get the encoded first line.
public static  StringgetReasonPhrase(int rc)
     Gets the reason phrase.
public  StringgetReasonPhrase()
     Get the reason phrase.
public  StringgetSIPVersion()
     Gets the SIP version string.
public  intgetStatusCode()
     Get the staus code (conveniance function).
public  StatusLinegetStatusLine()
     Get the status line of the response.
public static  booleanisFinalResponse(int rc)
     Return true if the response is a final response.
Parameters:
  rc - is the return code.
public  booleanisFinalResponse()
    
public  voidsetReasonPhrase(String reasonPhrase)
     Set the reason phrase.
public  voidsetSIPVersion(String sipVersion)
     Sets the SIP version string.
public  voidsetStatusCode(int statusCode)
     set the status code.
public  voidsetStatusLine(StatusLine sl)
     Set the status line field.
public  StringtoString()
    

Field Detail
ACCEPTED
final public static int ACCEPTED(Code)
The Acceptable extension response code signifies that the request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. There is no facility for re-sending a status code from an asynchronous operation such as this. The 202 response is intentionally non-committal. Its purpose is to allow a server to accept a request for some other process (perhaps a batch-oriented process that is only run once per day) without requiring that the user agent's connection to the server persist until the process is completed. The entity returned with this response SHOULD include an indication of the request's current status and either a pointer to a status monitor or some estimate of when the user can expect the request to be fulfilled. This response code is specific to the event notification framework.
since:
   v1.1



ADDRESS_INCOMPLETE
final public static int ADDRESS_INCOMPLETE(Code)
The server received a request with a Request-URI that was incomplete. Additional information SHOULD be provided in the reason phrase. This status code allows overlapped dialing. With overlapped dialing, the client does not know the length of the dialing string. It sends strings of increasing lengths, prompting the user for more input, until it no longer receives a 484 (Address Incomplete) status response.



ALTERNATIVE_SERVICE
final public static int ALTERNATIVE_SERVICE(Code)
The call was not successful, but alternative services are possible. The alternative services are described in the message body of the response. Formats for such bodies are not defined here, and may be the subject of future standardization.



AMBIGUOUS
final public static int AMBIGUOUS(Code)
The Request-URI was ambiguous. The response MAY contain a listing of possible unambiguous addresses in Contact header fields. Revealing alternatives can infringe on privacy of the user or the organization. It MUST be possible to configure a server to respond with status 404 (Not Found) or to suppress the listing of possible choices for ambiguous Request-URIs. Some email and voice mail systems provide this functionality. A status code separate from 3xx is used since the semantics are different: for 300, it is assumed that the same person or service will be reached by the choices provided. While an automated choice or sequential search makes sense for a 3xx response, user intervention is required for a 485 (Ambiguous) response.



BAD_EVENT
final public static int BAD_EVENT(Code)
The Bad Event extension response code is used to indicate that the server did not understand the event package specified in a "Event" header field. This response code is specific to the event notification framework.
since:
   v1.1



BAD_EXTENSION
final public static int BAD_EXTENSION(Code)
The server did not understand the protocol extension specified in a Proxy-Require or Require header field. The server MUST include a list of the unsupported extensions in an Unsupported header field in the response.



BAD_GATEWAY
final public static int BAD_GATEWAY(Code)
The server, while acting as a gateway or proxy, received an invalid response from the downstream server it accessed in attempting to fulfill the request.



BAD_REQUEST
final public static int BAD_REQUEST(Code)
The request could not be understood due to malformed syntax. The Reason-Phrase SHOULD identify the syntax problem in more detail, for example, "Missing Call-ID header field".



BUSY_EVERYWHERE
final public static int BUSY_EVERYWHERE(Code)
The callee's end system was contacted successfully but the callee is busy and does not wish to take the call at this time. The response MAY indicate a better time to call in the Retry-After header field. If the callee does not wish to reveal the reason for declining the call, the callee uses status code 603 (Decline) instead. This status response is returned only if the client knows that no other end point (such as a voice mail system) will answer the request. Otherwise, 486 (Busy Here) should be returned.



BUSY_HERE
final public static int BUSY_HERE(Code)
The callee's end system was contacted successfully, but the callee is currently not willing or able to take additional calls at this end system. The response MAY indicate a better time to call in the Retry-After header field. The user could also be available elsewhere, such as through a voice mail service. Status 600 (Busy Everywhere) SHOULD be used if the client knows that no other end system will be able to accept this call.



CALL_IS_BEING_FORWARDED
final public static int CALL_IS_BEING_FORWARDED(Code)
A server MAY use this status code to indicate that the call is being forwarded to a different set of destinations.



CALL_OR_TRANSACTION_DOES_NOT_EXIST
final public static int CALL_OR_TRANSACTION_DOES_NOT_EXIST(Code)
This status indicates that the UAS received a request that does not match any existing dialog or transaction.



DECLINE
final public static int DECLINE(Code)
The callee's machine was successfully contacted but the user explicitly does not wish to or cannot participate. The response MAY indicate a better time to call in the Retry-After header field. This status response is returned only if the client knows that no other end point will answer the request.



DOES_NOT_EXIST_ANYWHERE
final public static int DOES_NOT_EXIST_ANYWHERE(Code)
The server has authoritative information that the user indicated in the Request-URI does not exist anywhere.



EXTENSION_REQUIRED
final public static int EXTENSION_REQUIRED(Code)
The UAS needs a particular extension to process the request, but this extension is not listed in a Supported header field in the request. Responses with this status code MUST contain a Require header field listing the required extensions.

A UAS SHOULD NOT use this response unless it truly cannot provide any useful service to the client. Instead, if a desirable extension is not listed in the Supported header field, servers SHOULD process the request using baseline SIP capabilities and any extensions supported by the client.
since:
   v1.1




FORBIDDEN
final public static int FORBIDDEN(Code)
The server understood the request, but is refusing to fulfill it. Authorization will not help, and the request SHOULD NOT be repeated.



GONE
final public static int GONE(Code)
The requested resource is no longer available at the server and no forwarding address is known. This condition is expected to be considered permanent. If the server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) SHOULD be used instead.



INTERVAL_TOO_BRIEF
final public static int INTERVAL_TOO_BRIEF(Code)
The server is rejecting the request because the expiration time of the resource refreshed by the request is too short. This response can be used by a registrar to reject a registration whose Contact header field expiration time was too small.
since:
   v1.1



LOOP_DETECTED
final public static int LOOP_DETECTED(Code)
The server has detected a loop.



MESSAGE_TOO_LARGE
final public static int MESSAGE_TOO_LARGE(Code)
The server was unable to process the request since the message length exceeded its capabilities.
since:
   v1.1



METHOD_NOT_ALLOWED
final public static int METHOD_NOT_ALLOWED(Code)
The method specified in the Request-Line is understood, but not allowed for the address identified by the Request-URI. The response MUST include an Allow header field containing a list of valid methods for the indicated address



MOVED_PERMANENTLY
final public static int MOVED_PERMANENTLY(Code)
The user can no longer be found at the address in the Request-URI, and the requesting client SHOULD retry at the new address given by the Contact header field. The requestor SHOULD update any local directories, address books, and user location caches with this new value and redirect future requests to the address(es) listed.



MOVED_TEMPORARILY
final public static int MOVED_TEMPORARILY(Code)
The requesting client SHOULD retry the request at the new address(es) given by the Contact header field. The Request-URI of the new request uses the value of the Contact header field in the response.

The duration of the validity of the Contact URI can be indicated through an Expires header field or an expires parameter in the Contact header field. Both proxies and User Agents MAY cache this URI for the duration of the expiration time. If there is no explicit expiration time, the address is only valid once for recursing, and MUST NOT be cached for future transactions.

If the URI cached from the Contact header field fails, the Request-URI from the redirected request MAY be tried again a single time. The temporary URI may have become out-of-date sooner than the expiration time, and a new temporary URI may be available.




MULTIPLE_CHOICES
final public static int MULTIPLE_CHOICES(Code)
The address in the request resolved to several choices, each with its own specific location, and the user (or UA) can select a preferred communication end point and redirect its request to that location.

The response MAY include a message body containing a list of resource characteristics and location(s) from which the user or UA can choose the one most appropriate, if allowed by the Accept request header field. However, no MIME types have been defined for this message body.

The choices SHOULD also be listed as Contact fields. Unlike HTTP, the SIP response MAY contain several Contact fields or a list of addresses in a Contact field. User Agents MAY use the Contact header field value for automatic redirection or MAY ask the user to confirm a choice. However, this specification does not define any standard for such automatic selection.

This status response is appropriate if the callee can be reached at several different locations and the server cannot or prefers not to proxy the request.




NOT_ACCEPTABLE
final public static int NOT_ACCEPTABLE(Code)
The resource identified by the request is only capable of generating response entities that have content characteristics not acceptable according to the Accept header field sent in the request.



NOT_ACCEPTABLE_HERE
final public static int NOT_ACCEPTABLE_HERE(Code)
The response has the same meaning as 606 (Not Acceptable), but only applies to the specific resource addressed by the Request-URI and the request may succeed elsewhere. A message body containing a description of media capabilities MAY be present in the response, which is formatted according to the Accept header field in the INVITE (or application/sdp if not present), the same as a message body in a 200 (OK) response to an OPTIONS request.
since:
   v1.1



NOT_FOUND
final public static int NOT_FOUND(Code)
The server has definitive information that the user does not exist at the domain specified in the Request-URI. This status is also returned if the domain in the Request-URI does not match any of the domains handled by the recipient of the request.



NOT_IMPLEMENTED
final public static int NOT_IMPLEMENTED(Code)
The server does not support the functionality required to fulfill the request. This is the appropriate response when a UAS does not recognize the request method and is not capable of supporting it for any user. Proxies forward all requests regardless of method. Note that a 405 (Method Not Allowed) is sent when the server recognizes the request method, but that method is not allowed or supported.



OK
final public static int OK(Code)
The request has succeeded. The information returned with the response depends on the method used in the request.



PAYMENT_REQUIRED
final public static int PAYMENT_REQUIRED(Code)
Reserved for future use.



PROXY_AUTHENTICATION_REQUIRED
final public static int PROXY_AUTHENTICATION_REQUIRED(Code)
This code is similar to 401 (Unauthorized), but indicates that the client MUST first authenticate itself with the proxy. This status code can be used for applications where access to the communication channel (for example, a telephony gateway) rather than the callee requires authentication.



QUEUED
final public static int QUEUED(Code)
The called party is temporarily unavailable, but the server has decided to queue the call rather than reject it. When the callee becomes available, it will return the appropriate final status response. The reason phrase MAY give further details about the status of the call, for example, "5 calls queued; expected waiting time is 15 minutes". The server MAY issue several 182 (Queued) responses to update the caller about the status of the queued call.



REQUEST_ENTITY_TOO_LARGE
final public static int REQUEST_ENTITY_TOO_LARGE(Code)
The server is refusing to process a request because the request entity-body is larger than the server is willing or able to process. The server MAY close the connection to prevent the client from continuing the request. If the condition is temporary, the server SHOULD include a Retry-After header field to indicate that it is temporary and after what time the client MAY try again.
since:
   v1.1



REQUEST_PENDING
final public static int REQUEST_PENDING(Code)
The request was received by a UAS that had a pending request within the same dialog.
since:
   v1.1



REQUEST_TERMINATED
final public static int REQUEST_TERMINATED(Code)
The request was terminated by a BYE or CANCEL request. This response is never returned for a CANCEL request itself.
since:
   v1.1



REQUEST_TIMEOUT
final public static int REQUEST_TIMEOUT(Code)
The server could not produce a response within a suitable amount of time, for example, if it could not determine the location of the user in time. The client MAY repeat the request without modifications at any later time.



REQUEST_URI_TOO_LONG
final public static int REQUEST_URI_TOO_LONG(Code)
The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret.
since:
   v1.1



RINGING
final public static int RINGING(Code)
The User Agent receiving the INVITE is trying to alert the user. This response MAY be used to initiate local ringback.



SERVER_INTERNAL_ERROR
final public static int SERVER_INTERNAL_ERROR(Code)
The server encountered an unexpected condition that prevented it from fulfilling the request. The client MAY display the specific error condition and MAY retry the request after several seconds. If the condition is temporary, the server MAY indicate when the client may retry the request using the Retry-After header field.



SERVER_TIMEOUT
final public static int SERVER_TIMEOUT(Code)
The server did not receive a timely response from an external server it accessed in attempting to process the request. 408 (Request Timeout) should be used instead if there was no response within the period specified in the Expires header field from the upstream server.



SERVICE_UNAVAILABLE
final public static int SERVICE_UNAVAILABLE(Code)
The server is temporarily unable to process the request due to a temporary overloading or maintenance of the server. The server MAY indicate when the client should retry the request in a Retry-After header field. If no Retry-After is given, the client MUST act as if it had received a 500 (Server Internal Error) response.

A client (proxy or UAC) receiving a 503 (Service Unavailable) SHOULD attempt to forward the request to an alternate server. It SHOULD NOT forward any other requests to that server for the duration specified in the Retry-After header field, if present.

Servers MAY refuse the connection or drop the request instead of responding with 503 (Service Unavailable).
since:
   v1.1




SESSION_NOT_ACCEPTABLE
final public static int SESSION_NOT_ACCEPTABLE(Code)
The user's agent was contacted successfully but some aspects of the session description such as the requested media, bandwidth, or addressing style were not acceptable. A 606 (Not Acceptable) response means that the user wishes to communicate, but cannot adequately support the session described. The 606 (Not Acceptable) response MAY contain a list of reasons in a Warning header field describing why the session described cannot be supported.

A message body containing a description of media capabilities MAY be present in the response, which is formatted according to the Accept header field in the INVITE (or application/sdp if not present), the same as a message body in a 200 (OK) response to an OPTIONS request.

It is hoped that negotiation will not frequently be needed, and when a new user is being invited to join an already existing conference, negotiation may not be possible. It is up to the invitation initiator to decide whether or not to act on a 606 (Not Acceptable) response.

This status response is returned only if the client knows that no other end point will answer the request. This specification renames this status code from NOT_ACCEPTABLE as in RFC3261 to SESSION_NOT_ACCEPTABLE due to it conflict with 406 (Not Acceptable) defined in this interface.




SESSION_PROGRESS
final public static int SESSION_PROGRESS(Code)
The 183 (Session Progress) response is used to convey information about the progress of the call that is not otherwise classified. The Reason-Phrase, header fields, or message body MAY be used to convey more details about the call progress.
since:
   v1.1



TEMPORARILY_UNAVAILABLE
final public static int TEMPORARILY_UNAVAILABLE(Code)
The callee's end system was contacted successfully but the callee is currently unavailable (for example, is not logged in, logged in but in a state that precludes communication with the callee, or has activated the "do not disturb" feature). The response MAY indicate a better time to call in the Retry-After header field. The user could also be available elsewhere (unbeknownst to this server). The reason phrase SHOULD indicate a more precise cause as to why the callee is unavailable. This value SHOULD be settable by the UA. Status 486 (Busy Here) MAY be used to more precisely indicate a particular reason for the call failure.

This status is also returned by a redirect or proxy server that recognizes the user identified by the Request-URI, but does not currently have a valid forwarding location for that user.
since:
   v1.1




TOO_MANY_HOPS
final public static int TOO_MANY_HOPS(Code)
The server received a request that contains a Max-Forwards header field with the value zero.



TRYING
final public static int TRYING(Code)
This response indicates that the request has been received by the next-hop server and that some unspecified action is being taken on behalf of this call (for example, a database is being consulted). This response, like all other provisional responses, stops retransmissions of an INVITE by a UAC. The 100 (Trying) response is different from other provisional responses, in that it is never forwarded upstream by a stateful proxy.



UNAUTHORIZED
final public static int UNAUTHORIZED(Code)
The request requires user authentication. This response is issued by UASs and registrars, while 407 (Proxy Authentication Required) is used by proxy servers.



UNDECIPHERABLE
final public static int UNDECIPHERABLE(Code)
The request was received by a UAS that contained an encrypted MIME body for which the recipient does not possess or will not provide an appropriate decryption key. This response MAY have a single body containing an appropriate public key that should be used to encrypt MIME bodies sent to this UA.
since:
   v1.1



UNSUPPORTED_MEDIA_TYPE
final public static int UNSUPPORTED_MEDIA_TYPE(Code)
The server is refusing to service the request because the message body of the request is in a format not supported by the server for the requested method. The server MUST return a list of acceptable formats using the Accept, Accept-Encoding, or Accept-Language header field, depending on the specific problem with the content.



UNSUPPORTED_URI_SCHEME
final public static int UNSUPPORTED_URI_SCHEME(Code)
The server cannot process the request because the scheme of the URI in the Request-URI is unknown to the server.
since:
   v1.1



USE_PROXY
final public static int USE_PROXY(Code)
The requested resource MUST be accessed through the proxy given by the Contact field. The Contact field gives the URI of the proxy. The recipient is expected to repeat this single request via the proxy. 305 (Use Proxy) responses MUST only be generated by UASs.



VERSION_NOT_SUPPORTED
final public static int VERSION_NOT_SUPPORTED(Code)
The server does not support, or refuses to support, the SIP protocol version that was used in the request. The server is indicating that it is unable or unwilling to complete the request using the same major version as the client, other than with this error message.



statusLine
protected StatusLine statusLine(Code)
The current status line.




Constructor Detail
Response
public Response()(Code)
Constructor.




Method Detail
checkHeaders
protected void checkHeaders() throws ParseException(Code)
Check the response structure. Must have from, to CSEQ and VIA headers.



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



createRequest
public Request createRequest(URI requestURI, ViaHeader via, CSeqHeader cseq) throws SipException(Code)
Create a new Request from the given response. Note that the RecordRoute Via and CSeqHeader 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.
Parameters:
  requestURI - is the request URI to use.
Parameters:
  via - is the via header to use.
Parameters:
  cseq - is the cseq header to use in the generatedrequest. a new request obect.
throws:
  SipException - if the request can't be created.



encode
public String encode()(Code)
Encode the SIP Request as a string. The string encoded canonical form of the message.



encodeAsBytes
public byte[] encodeAsBytes()(Code)
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. a byte array containing the Request encoded as a bytearray.



equals
public boolean equals(Object other)(Code)
Compare for equality.
Parameters:
  other - other object to compare with. true if the objects match



getFirstLine
public String getFirstLine()(Code)
Get the encoded first line. the status line encoded.



getReasonPhrase
public static String getReasonPhrase(int rc)(Code)
Gets the reason phrase.
Parameters:
  rc - the reason code the reason phrase as a string



getReasonPhrase
public String getReasonPhrase()(Code)
Get the reason phrase. the reason phrase.



getSIPVersion
public String getSIPVersion()(Code)
Gets the SIP version string. the SIP version string



getStatusCode
public int getStatusCode()(Code)
Get the staus code (conveniance function). the status code of the status line.



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



isFinalResponse
public static boolean isFinalResponse(int rc)(Code)
Return true if the response is a final response.
Parameters:
  rc - is the return code. true if the parameter is between the range 200 and 700.



isFinalResponse
public boolean isFinalResponse()(Code)
Is this a final response? true if this is a final response.



setReasonPhrase
public void setReasonPhrase(String reasonPhrase) throws IllegalArgumentException(Code)
Set the reason phrase.
Parameters:
  reasonPhrase - the reason phrase.
throws:
  IllegalArgumentException - if null string



setSIPVersion
public void setSIPVersion(String sipVersion)(Code)
Sets the SIP version string.
Parameters:
  sipVersion - the new SIP version



setStatusCode
public void setStatusCode(int statusCode) throws ParseException(Code)
set the status code.
Parameters:
  statusCode - is the status code to set.
throws:
  IllegalArgumentException - if invalid status code.



setStatusLine
public void setStatusLine(StatusLine sl)(Code)
Set the status line field.
Parameters:
  sl - Status line to set.



toString
public String toString()(Code)
Encodes the object contents as a string encoded string of object contents



Fields inherited from gov.nist.siplite.message.Message
final protected static String DEFAULT_ENCODING(Code)(Java Doc)
protected CSeqHeader cSeqHeader(Code)(Java Doc)
protected CallIdHeader callIdHeader(Code)(Java Doc)
protected ContentLengthHeader contentLengthHeader(Code)(Java Doc)
protected FromHeader fromHeader(Code)(Java Doc)
protected Vector headers(Code)(Java Doc)
protected String messageContent(Code)(Java Doc)
protected byte[] messageContentBytes(Code)(Java Doc)
protected Object messageContentObject(Code)(Java Doc)
protected ToHeader toHeader(Code)(Java Doc)
protected Vector unrecognizedHeaders(Code)(Java Doc)

Methods inherited from gov.nist.siplite.message.Message
public void addHeader(Header sipHeader) throws SipException(Code)(Java Doc)
public void addHeader(String sipHeader) throws SipException(Code)(Java Doc)
public void addUnparsed(String unparsed)(Code)(Java Doc)
public void attachHeader(Header h, boolean replaceflag) throws SipException(Code)(Java Doc)
public void attachHeader(Header header, boolean replaceFlag, boolean top) throws SipException(Code)(Java Doc)
public Object clone()(Code)(Java Doc)
public String encode()(Code)(Java Doc)
public byte[] encodeAsBytes()(Code)(Java Doc)
public boolean equals(Object other)(Code)(Java Doc)
public CSeqHeader getCSeqHeader()(Code)(Java Doc)
public int getCSeqHeaderNumber()(Code)(Java Doc)
public CallIdHeader getCallId()(Code)(Java Doc)
public String getCallIdentifier()(Code)(Java Doc)
public ContactList getContactHeaders()(Code)(Java Doc)
public Object getContent()(Code)(Java Doc)
public ContentLengthHeader getContentLengthHeader()(Code)(Java Doc)
public ContentTypeHeader getContentTypeHeader()(Code)(Java Doc)
public String getDialogId(boolean isServer)(Code)(Java Doc)
public String getDialogId(boolean isServer, String toTag)(Code)(Java Doc)
abstract public String getFirstLine()(Code)(Java Doc)
public FromHeader getFromHeader()(Code)(Java Doc)
public String getFromHeaderTag()(Code)(Java Doc)
public Header getHeader(String headerName)(Code)(Java Doc)
public HeaderList getHeaderList(String headerName)(Code)(Java Doc)
public Enumeration getHeaderNames()(Code)(Java Doc)
public Enumeration getHeaders()(Code)(Java Doc)
public Enumeration getHeaders(String headerName)(Code)(Java Doc)
public String getMessageContent() throws UnsupportedEncodingException(Code)(Java Doc)
public byte[] getRawContent()(Code)(Java Doc)
public RecordRouteList getRecordRouteHeaders()(Code)(Java Doc)
public RouteList getRouteHeaders()(Code)(Java Doc)
abstract public String getSIPVersion()(Code)(Java Doc)
public ToHeader getTo()(Code)(Java Doc)
public String getToTag()(Code)(Java Doc)
public ViaHeader getTopmostVia()(Code)(Java Doc)
public String getTransactionId()(Code)(Java Doc)
public Enumeration getUnrecognizedHeaders()(Code)(Java Doc)
public ViaList getViaHeaders()(Code)(Java Doc)
public boolean hasContent()(Code)(Java Doc)
public boolean hasFromHeaderTag()(Code)(Java Doc)
public boolean hasHeader(String headerName)(Code)(Java Doc)
public boolean hasToTag()(Code)(Java Doc)
public static boolean isRequestHeader(Header sipHeader)(Code)(Java Doc)
public static boolean isResponseHeader(Header sipHeader)(Code)(Java Doc)
public void removeContent()(Code)(Java Doc)
public void removeHeader(String headerName, boolean top)(Code)(Java Doc)
public void removeHeader(String headerName)(Code)(Java Doc)
public void setCSeqHeader(CSeqHeader cseqHeader) throws SipException(Code)(Java Doc)
public void setCallId(CallIdHeader callId) throws SipException(Code)(Java Doc)
public void setCallId(String callId) throws ParseException, SipException(Code)(Java Doc)
public void setContent(Object content, ContentTypeHeader contentTypeHeader) throws SipException(Code)(Java Doc)
public void setContent(Object content)(Code)(Java Doc)
public void setContentLength(ContentLengthHeader contentLength) throws SipException(Code)(Java Doc)
public void setFromHeader(FromHeader from) throws SipException(Code)(Java Doc)
public void setFromHeaderTag(String tag) throws SipException(Code)(Java Doc)
public void setHeader(Header header) throws IllegalArgumentException, SipException(Code)(Java Doc)
public void setHeader(HeaderList sipHeaderList) throws SipException(Code)(Java Doc)
public void setHeaders(Vector headers) throws SipException(Code)(Java Doc)
public void setMessageContent(String type, String subType, String messageContent) throws IllegalArgumentException(Code)(Java Doc)
public void setMessageContent(String type, String subType, byte[] messageContent) throws SipException(Code)(Java Doc)
public void setMessageContent(String content)(Code)(Java Doc)
public void setMessageContent(byte[] content)(Code)(Java Doc)
abstract public void setSIPVersion(String sipVersion) throws ParseException(Code)(Java Doc)
public void setTo(ToHeader to) throws SipException(Code)(Java Doc)
public void setToTag(String tag) throws SipException(Code)(Java Doc)
public void setVia(ViaList viaList) throws SipException(Code)(Java Doc)
public void setVia(Vector viaList) throws SipException(Code)(Java Doc)

Methods inherited from gov.nist.core.GenericObject
abstract public Object clone()(Code)(Java Doc)
public static int compareToIgnoreCase(String s1, String s2)(Code)(Java Doc)
abstract public String encode()(Code)(Java Doc)
public static boolean equalsIgnoreCase(String s1, String s2)(Code)(Java Doc)

Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.