|
Oracle® Fusion Middleware Java API Reference for Oracle ADF Faces 11g Release 1 (11.1.1.9.0) E52936-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.adf.view.rich.remote.RemoteApplicationResponseGenerator
public final class RemoteApplicationResponseGenerator
Generates various types of RemoteApplicationResponses. Sometimes when using the RemoteApplicationFramework, it might be advantagous to pass around the RemoteApplicationResponse object to indicate the result of a particular connection. If things go wrong on the consumer side during this request, however, it would be advantagous to be able to generate a RemoteApplicationResponse indicating the failure. <p/> Additionally, extensions to the Scotty framework on the producer side may generate responses of thier own. This utility will help in the generation of RemoteApplicationResponse objects such that they are implemented consistantly across the framework.
Constructor Summary | |
---|---|
RemoteApplicationResponseGenerator() |
Method Summary | |
---|---|
static RemoteApplicationResponse |
getEmptyResponse(RemoteApplicationInstance app) Returns an empty "OK" response with a given RemoteApplicationInstance |
static RemoteApplicationResponse |
getErrorResponse(ErrorResult.Source source, RemoteApplicationInstance instance, java.lang.String message, java.lang.Throwable cause) Returns a RemoteApplicationResponse of RemoteApplicationResponse.Status.ERROR and RemoteApplicationResponse.Type.OBJECT . |
static RemoteApplicationResponse |
getErrorResponse(RemoteApplicationInstance instance, java.lang.String message, java.lang.Throwable cause) Returns a RemoteApplicationResponse of RemoteApplicationResponse.Status.ERROR and RemoteApplicationResponse.Type.OBJECT . |
static RemoteApplicationResponse |
getErrorResponse(RemoteApplicationInstance instance, java.lang.Throwable cause) Returns a RemoteApplicationResponse of RemoteApplicationResponse.Status.ERROR and RemoteApplicationResponse.Type.OBJECT . |
static RemoteApplicationResponse |
getErrorResponse(RemoteApplicationResponse resp, java.lang.Throwable cause) This returns a RemoteApplicationError response given another response and the Error. |
static RemoteApplicationResponse |
getErrorResponse(java.lang.String message, java.lang.Throwable cause) Returns a RemoteApplicationResponse of RemoteApplicationResponse.Status.ERROR and RemoteApplicationResponse.Type.OBJECT . |
static RemoteApplicationResponse |
getErrorResponse(java.lang.Throwable cause) Returns a RemoteApplicationResponse of RemoteApplicationResponse.Status.ERROR and RemoteApplicationResponse.Type.OBJECT . |
static RemoteApplicationResponse |
getTaskErrorResponse(RemoteApplicationInstance instance, java.lang.String task, java.lang.String message, java.lang.Throwable t) Returns a task error response from the producer. |
static RemoteApplicationResponse |
getTaskErrorResponse(RemoteApplicationInstance instance, java.lang.String task, java.lang.Throwable t) |
static RemoteApplicationResponse |
getVersionMismatchResponse(java.lang.String version) Returns a new VersionMismatchResponse which signigies that the consumer and the producer do not have the same version. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RemoteApplicationResponseGenerator()
Method Detail |
---|
public static RemoteApplicationResponse getErrorResponse(java.lang.Throwable cause)
RemoteApplicationResponse.Status.ERROR
and RemoteApplicationResponse.Type.OBJECT
. This response will return a result of type ErrorResult
with the supplied cause and a message which is the result of the localized message on the throwable and then from the normal exception message if any are provided. <p/> The source of the ErrorResult is automatically determined using the result of RemoteApplicationUtils.isRemote()
.cause
- the cause of the error. This property must not be null
java.lang.IllegalArgumentException
- if the cause
attribute is null
public static RemoteApplicationResponse getErrorResponse(java.lang.String message, java.lang.Throwable cause)
RemoteApplicationResponse.Status.ERROR
and RemoteApplicationResponse.Type.OBJECT
. This response will return a result of type ErrorResult
with the supplied cause and a message which is the result of the localized message on the throwable and then from the normal exception message if any are provided. The source of the ErrorResult is automatically determined using the result of RemoteApplicationUtils.isRemote()
. <p/> If the message is null, the result of ErrorResult.getMessage()
will be taken first from the localized message on the throwable and then from the normal exception message if any are provided.message
- a special message to include with the error responsecause
- the cause of the error. This property must not be null
java.lang.IllegalArgumentException
- if the cause
attribute is null
public static RemoteApplicationResponse getErrorResponse(RemoteApplicationInstance instance, java.lang.Throwable cause)
RemoteApplicationResponse.Status.ERROR
and RemoteApplicationResponse.Type.OBJECT
. This response will return a result of type ErrorResult
with the supplied cause and a message which is the result of the localized message on the throwable and then from the normal exception message if any are provided. The source of the ErrorResult is automatically determined using the result of RemoteApplicationUtils.isRemote()
.instance
- the current RemoteApplicationInstance if there is onecause
- the cause of the error. This property must not be null
java.lang.IllegalArgumentException
- if the cause
attribute is null
public static RemoteApplicationResponse getErrorResponse(RemoteApplicationInstance instance, java.lang.String message, java.lang.Throwable cause)
RemoteApplicationResponse.Status.ERROR
and RemoteApplicationResponse.Type.OBJECT
. This response will return a result of type ErrorResult
with the supplied message and cause. The source of the ErrorResult
is automatically determined using the result of RemoteApplicationUtils.isRemote()
. <p/> If the message is null, the result of ErrorResult.getMessage()
will be taken first from the localized message on the throwable and then from the normal exception message if any are provided.instance
- the current RemoteApplicationInstance if there is onemessage
- a special message to include with the error responsecause
- the cause of the error. This property must not be null
java.lang.IllegalArgumentException
- if the cause
attribute is null
public static RemoteApplicationResponse getErrorResponse(ErrorResult.Source source, RemoteApplicationInstance instance, java.lang.String message, java.lang.Throwable cause)
RemoteApplicationResponse.Status.ERROR
and RemoteApplicationResponse.Type.OBJECT
. This response will return a result of type ErrorResult
with the supplied source, message and cause. <p/> If the message is null, the result of ErrorResult.getMessage()
will be taken first from the localized message on the throwable and then from the normal exception message if any are provided.source
- the source of this error response. This property must not be null
instance
- the current RemoteApplicationInstance if there is onemessage
- a special message to include with the error responsecause
- the cause of the error. This property must not be null
java.lang.IllegalArgumentException
- if either source
or cause
attributes are null
public static RemoteApplicationResponse getErrorResponse(RemoteApplicationResponse resp, java.lang.Throwable cause)
resp
-t
-public static RemoteApplicationResponse getVersionMismatchResponse(java.lang.String version)
version
- a string containing the version of the remote containerpublic static RemoteApplicationResponse getEmptyResponse(RemoteApplicationInstance app)
app
-public static RemoteApplicationResponse getTaskErrorResponse(RemoteApplicationInstance instance, java.lang.String task, java.lang.String message, java.lang.Throwable t)
task
- the name of the task that caused the issueinstance
- the RemoteApplicationInstance on the producermessage
- on the TaskErrorResultt
- the "cause" in the TaskErrorResultpublic static RemoteApplicationResponse getTaskErrorResponse(RemoteApplicationInstance instance, java.lang.String task, java.lang.Throwable t)
|
Oracle® Fusion Middleware Java API Reference for Oracle ADF Faces 11g Release 1 (11.1.1.9.0) E52936-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |