Skip navigation links

Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1.7.0)
E10684-08


oracle.adf.view.rich.remote
Class RemoteApplicationResponse

java.lang.Object
  extended by oracle.adf.view.rich.remote.RemoteApplicationResponse

All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RemoteApplicationResponseSerializedStreaming

public abstract class RemoteApplicationResponse
extends java.lang.Object
implements java.io.Serializable

The response returned from a remote application request. This response contains a status flag which tells, generally, what happened durring the response as well as what the response result will look like. It returns a response type which will either be EMPTY, OBJECT or STREAM and it will also contain the task resuts that were returned from the various TaskHandlers that were executed durring the request. <p/> The final piece that will be returned is an up-to-date RemoteApplicationInstance which can be used to make subsequent requests to this server for this instance. <p/> Note: because of special stream handling that we have in place, just because an instance of a particular RemoteApplicationResponse is sent from the producer, it is not guarenteed that the same instance will be recieved on the consumer. Instead there will be a functional equivalent that complys with the contract of this interface but may not contain any additional methods or functions.

See Also:
Serialized Form

Nested Class Summary
static class RemoteApplicationResponse.Status
          The status of the execution result.
static class RemoteApplicationResponse.Type
          This returns the type of response.

 

Constructor Summary
RemoteApplicationResponse()
           

 

Method Summary
abstract  RemoteApplicationInstance getRemoteApplicationInstance()
          Returns the current RemoteAdfApplicationInstance.
abstract  java.lang.Object getResult()
          Returns the result based on type.
abstract  RemoteApplicationResponse.Status getResultStatus()
          Returns the current Result Status
abstract  RemoteApplicationResponse.Type getResultType()
          Returns the current Result Type
 java.lang.Object getTaskResult(java.lang.String returnId)
          Returns the result of a particular Task invocation.
abstract  java.util.Map<java.lang.String,java.io.Serializable> getTaskResultMap()
          Returns a unmodifiable map of TaskResults.
protected  java.lang.Object writeReplace()
          To handle streaming requests and optimize the protocol, this method is implemented to return response objects based on type.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

RemoteApplicationResponse

public RemoteApplicationResponse()

Method Detail

getTaskResult

public java.lang.Object getTaskResult(java.lang.String returnId)
Returns the result of a particular Task invocation. Tasks are registered via the RemoteTaskFlowRequest#addTask(java.lang.String,java.lang.Serializable....
Parameters:
returnId - the return Id assigned by the addTask method
Returns:
the object returned from the task handler

getTaskResultMap

public abstract java.util.Map<java.lang.String,java.io.Serializable> getTaskResultMap()
Returns a unmodifiable map of TaskResults.

getRemoteApplicationInstance

public abstract RemoteApplicationInstance getRemoteApplicationInstance()
Returns the current RemoteAdfApplicationInstance. This instance contains all of the updated information on the request.
Returns:

getResultStatus

public abstract RemoteApplicationResponse.Status getResultStatus()
Returns the current Result Status
Returns:

getResultType

public abstract RemoteApplicationResponse.Type getResultType()
Returns the current Result Type
Returns:

getResult

public abstract java.lang.Object getResult()
Returns the result based on type. The getResult can return any number of objects, but there are certain result types which return specific types of responses. They are:
Type.STREAM
- returns an inputStream to get data directly from the server.
Type.EXCEPTION
- returns an Exception object.
Type.OBJECT
- this is a catch all. Returns an arbitrary object from the server
Returns:

writeReplace

protected java.lang.Object writeReplace()
To handle streaming requests and optimize the protocol, this method is implemented to return response objects based on type. In general, implementations will not have to override this, however, because of the way this method works, the type of object returned to the consumer will NOT be of the same type sent by the producer. Instead it will contain some highly optimized "copies" of the response. To return the origional object (which is not suggested), you could override this method to provide your own object.

Note: this method is used by the built-in java serialization system. Please do no refactor.

Returns:

Skip navigation links

Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1.7.0)
E10684-08


Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.