mirror of
https://github.com/apache/struts.git
synced 2026-08-06 15:17:00 +00:00
define constant for timeout result
This commit is contained in:
@@ -27,6 +27,12 @@ import java.util.concurrent.Executor;
|
||||
* @since 2.6
|
||||
*/
|
||||
public class AsyncAction implements Callable {
|
||||
|
||||
/**
|
||||
* The action invocation was successful but did not return the result before timeout.
|
||||
*/
|
||||
public static final String TIMEOUT = "timeout";
|
||||
|
||||
private Callable callable;
|
||||
private Long timeout;
|
||||
private Executor executor;
|
||||
|
||||
@@ -132,7 +132,7 @@ public class DefaultAsyncManager implements AsyncManager, AsyncListener {
|
||||
@Override
|
||||
public void onTimeout(AsyncEvent asyncEvent) throws IOException {
|
||||
LOG.debug("Processing timeout for " + asyncEvent.getAsyncContext());
|
||||
setAsyncActionResultAndDispatch("timeout");
|
||||
setAsyncActionResultAndDispatch(AsyncAction.TIMEOUT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user