Package com.microstrategy.web.controller
Class TaskProcessorRequestState
- java.lang.Object
-
- com.microstrategy.web.controller.TaskProcessorRequestState
-
- All Implemented Interfaces:
RequestState
,TaskStatusCodes
public class TaskProcessorRequestState extends java.lang.Object implements RequestState, TaskStatusCodes
TheRequestState
object to used by the Task Processor.- Since:
- MicroStrategy Web 8.1.0
-
-
Field Summary
-
Fields inherited from interface com.microstrategy.web.tasks.TaskStatusCodes
TASK_FORBIDDEN, TASK_INTERNAL_ERROR, TASK_MISCONFIGURED, TASK_NOT_FOUND, TASK_NOT_REQUESTED, TASK_REQUEST_MALFORMED, TASK_REQUEST_RESUBMIT, TASK_SUCCESS, TASK_UNAUTHORIZED
-
-
Constructor Summary
Constructors Constructor Description TaskProcessorRequestState()
Creates a new TaskProcessorRequestState object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
failure()
Returns whether the incoming request was a failure or not.ContainerServices
getContainerServices()
TaskOutput
getGeneratedContent()
Returns the generated content for the task request.java.lang.String
getProcessRequestErrorMessage()
Returns the error message associated with this process request.int
getProcessRequestStatusCode()
Returns the status code associated the task request.java.lang.Integer
getProcessRequestTaskErrorCode()
Returns the task error code, if set.RequestKeys
getRequestKeys()
Returns the RequestKeys associated with this Task request.TaskProcessor.TaskInvoker
getTaskInvoker()
Returns task invoker role behind the request.boolean
isCompressionEnabled()
boolean
requestIsComplete()
boolean
serializeBinaryContent()
Whether the Task Processor Controller should attempt to serialize binary content generated by a Task directly to the Output Stream.void
setCompressionEnabled(boolean compressionEnabled)
void
setContainerServices(ContainerServices cs)
void
setGeneratedContent(TaskOutput taskOutput)
Sets the generated content for the task request.void
setProcessRequestErrorMessage(java.lang.String errMsg)
Sets the error message associated with this process request.void
setProcessRequestStatusCode(int statusCode)
Sets the status code associated the task request.void
setProcessRequestTaskErrorCode(java.lang.Integer taskErrorCode)
Sets the task-specific error code.void
setRequestIsComplete(boolean isComplete)
Indicates whether the request is complete--that is, fully sent to the output stream by the Task.void
setRequestKeys(RequestKeys requestKeys)
Sets the RequestKeys associated with this Task request.void
setSerializeBinaryContent(boolean serialize)
Sets whether the Task Processor Controller should serialize binary content generated by a Task directly to the Output Stream.void
setTaskInvoker(TaskProcessor.TaskInvoker taskInvoker)
Sets task invoker role to facilitate authorization in task displaying and execution.
-
-
-
Method Detail
-
getContainerServices
public ContainerServices getContainerServices()
- Specified by:
getContainerServices
in interfaceRequestState
-
setContainerServices
public void setContainerServices(ContainerServices cs)
- Specified by:
setContainerServices
in interfaceRequestState
-
requestIsComplete
public boolean requestIsComplete()
- Specified by:
requestIsComplete
in interfaceRequestState
-
getProcessRequestErrorMessage
public java.lang.String getProcessRequestErrorMessage()
Returns the error message associated with this process request.- Returns:
- The error message associated with this process request.
-
setProcessRequestErrorMessage
public void setProcessRequestErrorMessage(java.lang.String errMsg)
Sets the error message associated with this process request.- Parameters:
errMsg
- The error message associated with this process request.
-
getGeneratedContent
public TaskOutput getGeneratedContent()
Returns the generated content for the task request.- Returns:
- The generated content for the task request, in the form of a
TaskOutput
.
-
setGeneratedContent
public void setGeneratedContent(TaskOutput taskOutput)
Sets the generated content for the task request.- Parameters:
taskOutput
- The generated content for the task request.- Since:
- MicroStrategy Web 9.0.0
-
getProcessRequestStatusCode
public int getProcessRequestStatusCode()
Returns the status code associated the task request.- Returns:
- The status code associated the task request.
-
setProcessRequestStatusCode
public void setProcessRequestStatusCode(int statusCode)
Sets the status code associated the task request.- Parameters:
statusCode
- The status code associated the task request.
-
getProcessRequestTaskErrorCode
public java.lang.Integer getProcessRequestTaskErrorCode()
Returns the task error code, if set.- Returns:
- The Task-specific error code.
-
setProcessRequestTaskErrorCode
public void setProcessRequestTaskErrorCode(java.lang.Integer taskErrorCode)
Sets the task-specific error code.- Parameters:
taskErrorCode
- The task-specific error code.
-
failure
public boolean failure()
Returns whether the incoming request was a failure or not.- Returns:
- True if the incoming task request was not satisfied; otherwise, false.
-
getRequestKeys
public RequestKeys getRequestKeys()
Returns the RequestKeys associated with this Task request.- Returns:
- The
RequestKeys
object associated with this request.
-
setRequestKeys
public void setRequestKeys(RequestKeys requestKeys)
Sets the RequestKeys associated with this Task request.- Parameters:
requestKeys
- TheRequestKeys
object to use with this Task request.- Since:
- MicroStrategy Web 8.1.1
-
setRequestIsComplete
public void setRequestIsComplete(boolean isComplete)
Indicates whether the request is complete--that is, fully sent to the output stream by the Task.- Parameters:
isComplete
- True if the Task has fully completed the request, sending all content to the output stream; otherwise, False indicates that the Task Processor Controller must act to complete the request.- Since:
- MicroStrategy Web 8.1.1
-
serializeBinaryContent
public boolean serializeBinaryContent()
Whether the Task Processor Controller should attempt to serialize binary content generated by a Task directly to the Output Stream. By default, it is true.- Returns:
- True if the
TaskProcessorController
is going to serialize binary content directly; otherwise, false. - Since:
- MicroStrategy Web 9.0.0
-
setSerializeBinaryContent
public void setSerializeBinaryContent(boolean serialize)
Sets whether the Task Processor Controller should serialize binary content generated by a Task directly to the Output Stream. By default, it is true.- Parameters:
serialize
- True to cause theTaskProcessorController
to serialize binary content to the OutputStream; False causes it to remain in the MarkupOutput.- Since:
- MicroStrategy Web 9.0.0
-
getTaskInvoker
public TaskProcessor.TaskInvoker getTaskInvoker()
Returns task invoker role behind the request.
-
setTaskInvoker
public void setTaskInvoker(TaskProcessor.TaskInvoker taskInvoker)
Sets task invoker role to facilitate authorization in task displaying and execution.- Parameters:
taskInvoker
- the task invokerTaskProcessor.TaskInvoker
-
isCompressionEnabled
public boolean isCompressionEnabled()
-
setCompressionEnabled
public void setCompressionEnabled(boolean compressionEnabled)
-
-