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
TheRequestStateobject 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 booleanfailure()Returns whether the incoming request was a failure or not.ContainerServicesgetContainerServices()TaskOutputgetGeneratedContent()Returns the generated content for the task request.java.lang.StringgetProcessRequestErrorMessage()Returns the error message associated with this process request.intgetProcessRequestStatusCode()Returns the status code associated the task request.java.lang.IntegergetProcessRequestTaskErrorCode()Returns the task error code, if set.RequestKeysgetRequestKeys()Returns the RequestKeys associated with this Task request.TaskProcessor.TaskInvokergetTaskInvoker()Returns task invoker role behind the request.booleanisCompressionEnabled()booleanrequestIsComplete()booleanserializeBinaryContent()Whether the Task Processor Controller should attempt to serialize binary content generated by a Task directly to the Output Stream.voidsetCompressionEnabled(boolean compressionEnabled)voidsetContainerServices(ContainerServices cs)voidsetGeneratedContent(TaskOutput taskOutput)Sets the generated content for the task request.voidsetProcessRequestErrorMessage(java.lang.String errMsg)Sets the error message associated with this process request.voidsetProcessRequestStatusCode(int statusCode)Sets the status code associated the task request.voidsetProcessRequestTaskErrorCode(java.lang.Integer taskErrorCode)Sets the task-specific error code.voidsetRequestIsComplete(boolean isComplete)Indicates whether the request is complete--that is, fully sent to the output stream by the Task.voidsetRequestKeys(RequestKeys requestKeys)Sets the RequestKeys associated with this Task request.voidsetSerializeBinaryContent(boolean serialize)Sets whether the Task Processor Controller should serialize binary content generated by a Task directly to the Output Stream.voidsetTaskInvoker(TaskProcessor.TaskInvoker taskInvoker)Sets task invoker role to facilitate authorization in task displaying and execution.
-
-
-
Method Detail
-
getContainerServices
public ContainerServices getContainerServices()
- Specified by:
getContainerServicesin interfaceRequestState
-
setContainerServices
public void setContainerServices(ContainerServices cs)
- Specified by:
setContainerServicesin interfaceRequestState
-
requestIsComplete
public boolean requestIsComplete()
- Specified by:
requestIsCompletein 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
RequestKeysobject associated with this request.
-
setRequestKeys
public void setRequestKeys(RequestKeys requestKeys)
Sets the RequestKeys associated with this Task request.- Parameters:
requestKeys- TheRequestKeysobject 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
TaskProcessorControlleris 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 theTaskProcessorControllerto 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)
-
-