Package org.apache.activemq.web.async
Class AsyncServletRequest
java.lang.Object
org.apache.activemq.web.async.AsyncServletRequest
- All Implemented Interfaces:
jakarta.servlet.AsyncListener,EventListener
Wrapper object to hold and track Async servlet requests. This is
a replacement for the deprecated/removed Jetty Continuation
API as that has long been replaced by the Servlet Async api.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcomplete()voiddispatch()jakarta.servlet.AsyncContextstatic AsyncServletRequestgetAsyncRequest(jakarta.servlet.ServletRequest request) Look up the existing async request or create/ store a new request that be referenced laterbooleanbooleanbooleanvoidonComplete(jakarta.servlet.AsyncEvent event) voidonError(jakarta.servlet.AsyncEvent event) voidonStartAsync(jakarta.servlet.AsyncEvent event) voidonTimeout(jakarta.servlet.AsyncEvent event) voidsetAttribute(String name, Object attribute) voidsetTimeoutMs(long timeoutMs) void
-
Constructor Details
-
AsyncServletRequest
public AsyncServletRequest(jakarta.servlet.ServletRequest request)
-
-
Method Details
-
complete
public void complete() -
startAsync
public void startAsync() -
dispatch
public void dispatch() -
setAttribute
-
setTimeoutMs
public void setTimeoutMs(long timeoutMs) -
isInitial
public boolean isInitial() -
isExpired
public boolean isExpired() -
isDispatched
public boolean isDispatched() -
getAsyncContext
public jakarta.servlet.AsyncContext getAsyncContext() -
onComplete
public void onComplete(jakarta.servlet.AsyncEvent event) - Specified by:
onCompletein interfacejakarta.servlet.AsyncListener
-
onTimeout
public void onTimeout(jakarta.servlet.AsyncEvent event) - Specified by:
onTimeoutin interfacejakarta.servlet.AsyncListener
-
onError
public void onError(jakarta.servlet.AsyncEvent event) - Specified by:
onErrorin interfacejakarta.servlet.AsyncListener
-
onStartAsync
public void onStartAsync(jakarta.servlet.AsyncEvent event) - Specified by:
onStartAsyncin interfacejakarta.servlet.AsyncListener
-
getAsyncRequest
Look up the existing async request or create/ store a new request that be referenced later- Parameters:
request- the ServletRequest- Returns:
- the existing or new ActiveMQAsyncRequest
-