Class StrutsBackgroundProcess
java.lang.Object
org.apache.struts2.interceptor.exec.StrutsBackgroundProcess
- All Implemented Interfaces:
- Serializable,- Runnable,- BackgroundProcess
Background thread to be executed by the ExecuteAndWaitInterceptor.
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected booleanprotected Exceptionprotected ActionInvocationprotected String
- 
Constructor SummaryConstructorsConstructorDescriptionStrutsBackgroundProcess(ActionInvocation invocation, String threadName, int threadPriority) Constructs a background process
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidCalled after the background thread determines the result code from the ActionInvocation, but before the background thread is marked as done.protected voidCalled before the background thread determines the result code from the ActionInvocation.Retrieves the action.Gets the exception if any was thrown during the execution of the background process.Retrieves the action invocation.Gets the result of the background process.booleanisDone()Returns the status of the background process.prepare()voidrun()toString()
- 
Field Details- 
invocation
- 
exception
- 
result
- 
doneprotected boolean done
 
- 
- 
Constructor Details- 
StrutsBackgroundProcessConstructs a background process- Parameters:
- invocation- The action invocation
- threadName- The name of background thread
- threadPriority- The priority of background thread
 
 
- 
- 
Method Details- 
prepare- Specified by:
- preparein interface- BackgroundProcess
 
- 
runpublic void run()
- 
beforeInvocationCalled before the background thread determines the result code from the ActionInvocation.- Throws:
- Exception- any exception thrown will be thrown, in turn, by the ExecuteAndWaitInterceptor
 
- 
afterInvocationCalled after the background thread determines the result code from the ActionInvocation, but before the background thread is marked as done.- Throws:
- Exception- any exception thrown will be thrown, in turn, by the ExecuteAndWaitInterceptor
 
- 
getActionRetrieves the action.- Specified by:
- getActionin interface- BackgroundProcess
- Returns:
- the action.
 
- 
getInvocationRetrieves the action invocation.- Specified by:
- getInvocationin interface- BackgroundProcess
- Returns:
- the action invocation
 
- 
getResultGets the result of the background process.- Specified by:
- getResultin interface- BackgroundProcess
- Returns:
- the result; null if not done.
 
- 
getExceptionGets the exception if any was thrown during the execution of the background process.- Specified by:
- getExceptionin interface- BackgroundProcess
- Returns:
- the exception or null if no exception was thrown.
 
- 
isDonepublic boolean isDone()Returns the status of the background process.- Specified by:
- isDonein interface- BackgroundProcess
- Returns:
- true if finished, false otherwise
 
- 
toString
 
-