|
Oracle Fusion Middleware Java API Reference for the Oracle Access Management OAuth Service 11g Release 2 Patch Set 3 (11.1.2.3) E59498-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.idaas.oauth.sdk.response.OAuthRestResponse
public abstract class OAuthRestResponse
Base class handling the OAuth response. It creates the corresponding JSON object and handles the error and the error message if any. A status equals to 200 means that the request completed successfully.
Field Summary
protected org.codehaus.jettison.json.JSONObject |
tok Formatted response object. |
OAuthRestResponse(int status, java.lang.String response) Analyzes and formats the response. |
java.lang.String |
getErrorMessage() Returns the error message if any. |
int |
getStatus() |
boolean |
isError() Returns true if the response is an error. |
protected abstract void |
parseResponse(java.lang.String result) Computes the response and format it as a JSON object. |
protected void |
setErrorMessage(java.lang.String message) Updates the error message. |
java.lang.String |
toString() |
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail
protected org.codehaus.jettison.json.JSONObject tok
public OAuthRestResponse(int status, java.lang.String response) throws org.codehaus.jettison.json.JSONException
status
- response status (200 means successful)response
- the response message if the request is successful, else the error messageorg.codehaus.jettison.json.JSONException
- if at least one of the mandatory element in the response is missing, or if the response is not formatted correctly.public boolean isError()
protected abstract void parseResponse(java.lang.String result) throws org.codehaus.jettison.json.JSONException
result
- string to decodeorg.codehaus.jettison.json.JSONException
- if at least one of the mandatory element in the response is missing, or if the response is not formatted correctly.public java.lang.String getErrorMessage()
protected void setErrorMessage(java.lang.String message)
message
- the desired textpublic int getStatus()
public java.lang.String toString()
toString
in class java.lang.Object
|
Oracle and/or its affiliates. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |