java.lang.Object | ||
↳ | com.microstrategy.web.controller.AppControllerImpl | |
↳ | com.microstrategy.web.controller.TaskProcessorController |
This class is the AppController implementation for the TaskProcessor servlet. It contains the majority of the logic for handling incoming task requests, dispatching them to the appropriate tasks and formatting their results for the desired consumer.
This controller is responsible for generating the entire task response. There are two parts to this response: the envelope and the payload. The "payload" is easiest to understand: it is the result generated by the underlying task. The "envelope" is the markup that encapsulates the "payload". The envelope is often structured for the caller's consumption.
For example, the IFRAME envelope consists of a full HTML document with the BODY element specifying a JavaScript function to invoke for the 'onload' handler. An XMLHttpRequest envelope will contain less "wiring" to indicate when the request is complete.
Three HTTP parameters are relevant at this stage of task processing:
the task ID (known through the constant PARAM_NAME_TASK_ID
), the
task envelope (known through the constant PARAM_NAME_TASK_ENVELOPE
) and the task Content Type (know through the
constant PARAM_NAME_TASK_CONTENT_TYPE
). The task
ID identifies the registered Task
, the
envelope specifies a set of pages that are used to contain the payload and
the content type specifies the desired output format. If omitted, it
defaults to whatever is specified by the envelope.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | TaskProcessorController.TaskEnvelope |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | PARAM_NAME_TASK_CONTENT_ENCODING | The HTTP Parameter that specifies the desired transfer encoding for the content generated by the Task. | |||||||||
String | PARAM_NAME_TASK_CONTENT_TYPE | The HTTP Parameter that specifies the desired content type for the Task. | |||||||||
String | PARAM_NAME_TASK_ENVELOPE | The HTTP Parameter that specifies the type of envelope to use to containing the response. | |||||||||
String | REQ_ATTR_TASK_RESPONSE_CONTEXT | The name of the HTTP Request Attribute that contains the TaskProcessorResponseContext object. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
TaskProcessorController()
Creates a new TaskProcessorController object.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
errorAfterRedirect(RequestState reqState, Exception e)
What to do if there is an error after we have redirected to the
target page.
| ||||||||||
TaskProcessorController.InterfacePages | getAdminPages() | ||||||||||
String |
getBaseURL(ContainerServices cs)
The Base URL for this application.
| ||||||||||
String | getDefaultEnvelopeID() | ||||||||||
String |
getPage(RequestState reqState)
Get the relative path to the Page that should be displayed.
| ||||||||||
Set<String> | getPrivateTaskIDs() | ||||||||||
TaskProcessorController.TaskEnvelope | getTaskEnvelope(TaskProcessorRequestState tprState) | ||||||||||
List<String> | getTaskEnvelopeNames(boolean sorted) | ||||||||||
TaskFactory |
getTaskFactory()
Returns task factory singleton
| ||||||||||
TaskProcessor | getTaskProcessor() | ||||||||||
TaskProcessorController.InterfacePages | getViewerPages() | ||||||||||
void |
initializeApp(ContainerServices cs)
Initialize the application.
| ||||||||||
ExternalSecurity |
newExternalSecurity()
Creates a new
ExternalSecurity object. | ||||||||||
RequestState |
newRequestState()
Get a new
RequestState object to handle the incoming
request. | ||||||||||
boolean |
processRequest(RequestState reqState)
Process the incoming request.
| ||||||||||
boolean | showPrivateTaskIDs() | ||||||||||
void |
terminateApp()
Terminate the application.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | initializeEnvelopeTypes(ContainerServices cs) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
The HTTP Parameter that specifies the desired transfer encoding for the content generated by the Task.
The HTTP Parameter that specifies the desired content type for the Task.
The HTTP Parameter that specifies the type of envelope to use to containing the response.
The name of the HTTP Request Attribute that contains the TaskProcessorResponseContext object.
Creates a new TaskProcessorController object.
What to do if there is an error after we have redirected to the target page.
reqState | The RequestState object that holds per-request
data. |
---|---|
e | The Exception was raised. |
The Base URL for this application.
cs | The ContainerServices object that exposes a variety of
services. |
---|
Get the relative path to the Page that should be displayed.
reqState | The RequestState object that contains
per-request data structures. |
---|
Initialize the application.
cs | The ContainerServices object to use to complete the
initialization.
|
---|
Creates a new ExternalSecurity
object.
ExternalSecurity
object.
Get a new RequestState
object to handle the incoming
request.
RequestState
object to handle the incoming
request.
Process the incoming request.
reqState | The RequestState object that holds per-request
data. |
---|
Terminate the application.