public final class XServletAsyncHandler extends Object implements IXServletHandler
IXServletHandler that allows to run requests
asynchronously.| Constructor and Description |
|---|
XServletAsyncHandler(com.helger.servlet.async.ServletAsyncSpec aAsyncSpec,
IXServletHandler aNestedHandler) |
| Modifier and Type | Method and Description |
|---|---|
static com.helger.servlet.async.IAsyncServletRunner |
getAsyncServletRunner() |
void |
onRequest(javax.servlet.http.HttpServletRequest aHttpRequest,
javax.servlet.http.HttpServletResponse aHttpResponse,
com.helger.http.EHttpVersion eHttpVersion,
com.helger.commons.http.EHttpMethod eHttpMethod,
com.helger.web.scope.IRequestWebScope aRequestScope)
Handle the servlet action for a certain request and response.
|
void |
onServletDestroy()
Called upon Servlet destruction.
|
void |
onServletInit(com.helger.commons.collection.impl.ICommonsMap<String,String> aInitParams)
Called upon Servlet initialization
|
static void |
setAsyncServletRunner(com.helger.servlet.async.IAsyncServletRunner aAsyncServletRunner)
Set the async runner to be used.
|
String |
toString() |
public XServletAsyncHandler(@Nonnull com.helger.servlet.async.ServletAsyncSpec aAsyncSpec, @Nonnull IXServletHandler aNestedHandler)
public static void setAsyncServletRunner(@Nonnull com.helger.servlet.async.IAsyncServletRunner aAsyncServletRunner)
aAsyncServletRunner - The runner to be used. May not be null.@Nonnull public static com.helger.servlet.async.IAsyncServletRunner getAsyncServletRunner()
null.public void onServletInit(@Nonnull com.helger.commons.collection.impl.ICommonsMap<String,String> aInitParams) throws javax.servlet.ServletException
IXServletBasicHandleronServletInit in interface IXServletBasicHandleraInitParams - The init parameters. Never null but maybe empty.javax.servlet.ServletException - if something goes wrongpublic void onServletDestroy()
IXServletBasicHandleronServletDestroy in interface IXServletBasicHandlerpublic void onRequest(@Nonnull javax.servlet.http.HttpServletRequest aHttpRequest, @Nonnull javax.servlet.http.HttpServletResponse aHttpResponse, @Nonnull com.helger.http.EHttpVersion eHttpVersion, @Nonnull com.helger.commons.http.EHttpMethod eHttpMethod, @Nonnull com.helger.web.scope.IRequestWebScope aRequestScope) throws javax.servlet.ServletException, IOException
IXServletHandleronRequest in interface IXServletHandleraHttpRequest - HTTP servlet request. Never null.aHttpResponse - HTTP servlet response. Never null.eHttpVersion - HTTP version. Never null.eHttpMethod - HTTP method. Never null.aRequestScope - Request scope. Never null.javax.servlet.ServletException - On business errorIOException - On IO errorCopyright © 2017–2019 Philip Helger. All rights reserved.