com.opensymphony.webwork.interceptor
Class ExecuteAndWaitInterceptor

java.lang.Object
  extended bycom.opensymphony.webwork.interceptor.ExecuteAndWaitInterceptor
All Implemented Interfaces:
com.opensymphony.xwork.interceptor.Interceptor, Serializable

public class ExecuteAndWaitInterceptor
extends Object
implements com.opensymphony.xwork.interceptor.Interceptor

Executes an action in a background thread and then returns to the "wait" result. On the next request, if the action is done executing, the original result is sent back. This allows long running actions to execute while you present the user with a "Please, wait" message. The wait JSP should reload itself by using the following HTML in the HEAD area:

  <meta http-equiv="refresh" content="5;url=&lyww:url includeParams="'all'" />"/>
 

This will cause the request to be reloaded every 5 seconds. You will need to specify a result of "wait" in your action for this to work.

Author:
Pat Lightbody
See Also:
Serialized Form

Field Summary
static String KEY
           
 
Constructor Summary
ExecuteAndWaitInterceptor()
           
 
Method Summary
 void destroy()
           
 void init()
           
 String intercept(com.opensymphony.xwork.ActionInvocation actionInvocation)
           
 void setThreadPriority(int threadPriority)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY

public static final String KEY
See Also:
Constant Field Values
Constructor Detail

ExecuteAndWaitInterceptor

public ExecuteAndWaitInterceptor()
Method Detail

init

public void init()
Specified by:
init in interface com.opensymphony.xwork.interceptor.Interceptor

intercept

public String intercept(com.opensymphony.xwork.ActionInvocation actionInvocation)
                 throws Exception
Specified by:
intercept in interface com.opensymphony.xwork.interceptor.Interceptor
Throws:
Exception

destroy

public void destroy()
Specified by:
destroy in interface com.opensymphony.xwork.interceptor.Interceptor

setThreadPriority

public void setThreadPriority(int threadPriority)

WebWork Project Page