Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.interceptor
Class BackgroundProcess

    java.lang.Object
      org.apache.struts2.interceptor.BackgroundProcess

All Implemented Interfaces:
  java.io.Serializable

    public class BackgroundProcess

extends java.lang.Object
implements java.io.Serializable

Background thread to be executed by the ExecuteAndWaitInterceptor.

See Also:
  Serialized Form

Field Summary
`protected java.lang.Object` | `action`
`protected boolean` | `done`
`protected java.lang.Exception` | `exception`
`protected ActionInvocation` | `invocation`
`protected java.lang.String` | `result`

Constructor Summary
`BackgroundProcess(java.lang.String threadName, ActionInvocation invocation, int threadPriority)` Constructs a background process

Method Summary
`protected void` | `afterInvocation()` Called after the background thread determines the result code from the ActionInvocation, but before the background thread is marked as done.
`protected void` | `beforeInvocation()` Called before the background thread determines the result code from the ActionInvocation.
`java.lang.Object` | `getAction()` Retrieves the action.
`java.lang.Exception` | `getException()` Gets the exception if any was thrown during the execution of the background process.
`ActionInvocation` | `getInvocation()` Retrieves the action invocation.
`java.lang.String` | `getResult()` Gets the result of the background process.
`boolean` | `isDone()` Returns the status of the background process.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### action

    protected java.lang.Object action

### invocation

    protected ActionInvocation invocation

### result

    protected java.lang.String result

### exception

    protected java.lang.Exception exception

### done

    protected boolean done

Constructor Detail

### BackgroundProcess

    public BackgroundProcess(java.lang.String threadName,
                             ActionInvocation invocation,
                             int threadPriority)

  Constructs a background process

  Parameters:
    `threadName` - The thread name
    `invocation` - The action invocation
    `threadPriority` - The thread priority

Method Detail

### beforeInvocation

    protected void beforeInvocation()
                             throws java.lang.Exception

  Called before the background thread determines the result code from the ActionInvocation.

  Throws:
    `java.lang.Exception` - any exception thrown will be thrown, in turn, by the ExecuteAndWaitInterceptor

### afterInvocation

    protected void afterInvocation()
                            throws java.lang.Exception

  Called after the background thread determines the result code from the ActionInvocation, but before the background thread is marked as done.

  Throws:
    `java.lang.Exception` - any exception thrown will be thrown, in turn, by the ExecuteAndWaitInterceptor

### getAction

    public java.lang.Object getAction()

  Retrieves the action.

  Returns:
    the action.

### getInvocation

    public ActionInvocation getInvocation()

  Retrieves the action invocation.

  Returns:
    the action invocation

### getResult

    public java.lang.String getResult()

  Gets the result of the background process.

  Returns:
    the result; `null` if not done.

### getException

    public java.lang.Exception getException()

  Gets the exception if any was thrown during the execution of the background process.

  Returns:
    the exception or `null` if no exception was thrown.

### isDone

    public boolean isDone()

  Returns the status of the background process.

  Returns:
    `true` if finished, `false` otherwise

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.