|
Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces 11g Release 1 (11.1.1.7.0) E10684-08 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.adf.view.rich.remote.RemoteApplicationRequest
public class RemoteApplicationRequest
This is the request object into the remote application. This object contains all of the information needed to actually execute a remote task flow or other producer logic. <p/> Asside from standard request artifacts (like cookies and headers and whatnot), this Object supports "tasks". Tasks are units of work which can be added to the request on an as-needed basis, and allow information be be exchanged between consumer and producer as well as custom code to be executed. The RegionComponent provides the ability for different pieces of ADF to add tasks to each request by creating these task invocations. The system typically works as follows: <p/> String responseId = remoteApplicationRequest.addTask(MyRemoteTaskHandler.class, param1, param2, param3); RemoteApplicationResponse remoteApplicationResponse = RemoteApplicationUtils.run(remoteApplicationRequest); Object fromHandler = remoteApplicationResponse.getTaskResponse(responseId);
<p/> Obviously this is a simplistic usecase, but essentially what happens is the task is added to the remote request. That executes a TaskHandler called MyRemoteTaskHandler
on the producer which could do setup with the specified params before the faces lifecycle is run. It can then return a result after the faces lifecycle is run which is then retrieved from the response. It is in this way that the RemoteApplication system can be extended in functionality while allowing the base protocol and framework to remain relatively lean.
Nested Class Summary | |
---|---|
static class |
RemoteApplicationRequest.Operation An enumeration of request types. |
Constructor Summary | |
---|---|
RemoteApplicationRequest(RemoteApplication app) |
|
RemoteApplicationRequest(RemoteApplication app, RemoteApplicationRequest.Operation operation) Constructs a new RemoteApplicationRequest for a particular RemoteApplication. |
|
RemoteApplicationRequest(RemoteApplication app, RemoteApplicationRequest.Operation operation, java.lang.String resource) Constructs a new RemoteApplicationRequest with for a particular resource. |
|
RemoteApplicationRequest(RemoteApplication app, java.lang.String resource) Constructs a new Execute RemoteApplicationRequest for a particular RemoteApplication. |
Method Summary | |
---|---|
void |
addCookie(javax.servlet.http.Cookie cookie) Add's a cookie to this request |
void |
addCookies(java.util.List<? extends javax.servlet.http.Cookie> cookies) Adds a list of cookies to this request |
void |
addHeader(java.lang.String name, java.lang.String value) Add's a header to the header map. |
void |
addHeaders(java.lang.String name, java.lang.String[] values) This add's multiple headers with the same name to this request. |
java.lang.String |
addTask(java.lang.Class<? extends TaskHandler> taskHandler, java.io.Serializable... parameters) Adds a task to this request. |
java.lang.String |
addTask(java.lang.String taskHandler, java.io.Serializable... parameters) Adds a task to this request. |
void |
clearCookies() Clears all the stored cookies on this request |
java.util.List<? extends javax.servlet.http.Cookie> |
getCookies() Returns an unmodifiable list of cookies which need to be sent back to to the remote application during this request. |
java.lang.String |
getHeader(java.lang.String header) Returns a single header value. |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getHeaderMap() Returns a map of headers. |
java.util.List<java.lang.String> |
getHeaderValues(java.lang.String header) Returns all of the values of a header. |
java.lang.String |
getMethod() Returns the 'simulated' method of this remote request. |
RemoteApplicationRequest.Operation |
getOperation() Returns the operation which is to be performed by this request. |
java.util.Map<java.lang.String,java.lang.String[]> |
getParameterMap() Returns the parameter map use for this request. |
java.lang.String |
getQueryString() Returns the current query string of this instance. |
RemoteApplication |
getRemoteApplication() Returns the RemoteApplication or the RemoteApplicationInstance used to create this class. |
java.lang.String |
getResource() Returns the resource that should be retrieved by this RemoteApplicationRequest |
java.util.List<TaskInvocation> |
getTaskInvocations() Returns an unmodifiable list of TaskInvocation objects. |
void |
setMethod(java.lang.String method) Sets the 'simulated' request method for this request. |
void |
setQueryString(java.lang.String queryString) Sets the query string of this request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RemoteApplicationRequest(RemoteApplication app)
public RemoteApplicationRequest(RemoteApplication app, java.lang.String resource)
app
-public RemoteApplicationRequest(RemoteApplication app, RemoteApplicationRequest.Operation operation)
app
-public RemoteApplicationRequest(RemoteApplication app, RemoteApplicationRequest.Operation operation, java.lang.String resource)
app
-operation
-resource
-java.lang.NullPointerException
- is either app or operation is nulljava.lang.IllegalArgumentException
- if this is a "fetch" operation and resource is nullMethod Detail |
---|
public RemoteApplication getRemoteApplication()
public RemoteApplicationRequest.Operation getOperation()
RemoteApplicationRequest.Operation
.public java.lang.String getResource()
public void setMethod(java.lang.String method)
HttpServletRequest.getMetho()
on the producer. Valid methods are: GET, POST, HEAD, OPTIONS, PUT, DELETE, or TRACE. The default is GET.method
- the 'simulated' method of the remote request.public java.lang.String getMethod()
public java.util.List<? extends javax.servlet.http.Cookie> getCookies()
public void clearCookies()
public void addCookie(javax.servlet.http.Cookie cookie)
cookie
- the cookiepublic void addCookies(java.util.List<? extends javax.servlet.http.Cookie> cookies)
cookies
-public void setQueryString(java.lang.String queryString)
queryString
- a valid queryString without the leading "?".public java.lang.String getQueryString()
public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
HttpServletRequest
as such.public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaderMap()
public void addHeader(java.lang.String name, java.lang.String value)
name
- the name of the headervalue
- the value of the headerpublic void addHeaders(java.lang.String name, java.lang.String[] values)
name
-values
-public java.lang.String getHeader(java.lang.String header)
null
. If the headers are present then the value of the first occurance of this header is returned.header
-public java.util.List<java.lang.String> getHeaderValues(java.lang.String header)
header
-public java.lang.String addTask(java.lang.String taskHandler, java.io.Serializable... parameters)
taskHandler
- a string representing the classname of the handler being invokedparameters
- a list of parametersjava.lang.UnsupportedOperationException
- id this method is not supported for the type of request. Currently "fetch" type requests do not support task execution.public java.lang.String addTask(java.lang.Class<? extends TaskHandler> taskHandler, java.io.Serializable... parameters)
taskHandler
- a Class representing the classname of the handler being invokedparameters
- a list of parametersjava.lang.UnsupportedOperationException
- id this method is not supported for the type of request. Currently "fetch" type requests do not support task execution.public java.util.List<TaskInvocation> getTaskInvocations()
|
Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces 11g Release 1 (11.1.1.7.0) E10684-08 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |