@NotThreadSafe public abstract class AbstractXServlet extends javax.servlet.http.HttpServlet
HttpServlet this class uses a handler map with
EHttpMethod as the key.HttpServlet to be usable with
annotation based configuration in Jetty (was GenericServlet previously)| Modifier and Type | Field and Description |
|---|---|
static String |
REQUEST_ATTR_HANDLED_ASYNC
Internal request attribute defining whether a request was handled
asynchronously.
|
static String |
REQUEST_ATTR_SCOPE_CREATED
Internal request attribute defining whether a request scope was created or
re-used
|
| Constructor and Description |
|---|
AbstractXServlet()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
protected com.helger.commons.callback.CallbackList<IXServletExceptionHandler> |
exceptionHandler() |
protected com.helger.commons.collection.impl.ICommonsList<IXServletHighLevelFilter> |
filterHighLevelList() |
protected com.helger.commons.collection.impl.ICommonsList<IXServletLowLevelFilter> |
filterLowLevelList() |
protected ServletStatusManager |
getServletStatusMgr() |
protected XServletHandlerRegistry |
handlerRegistry() |
void |
init(javax.servlet.ServletConfig aSC)
A final overload of "init".
|
void |
log(String sMsg) |
void |
log(String sMsg,
Throwable t) |
protected void |
logInvalidRequestSetup(String sMsg,
javax.servlet.http.HttpServletRequest aHttpRequest)
This method logs errors, in case a HttpServletRequest object is missing basic
information or uses unsupported values for e.g.
|
protected void |
service(javax.servlet.http.HttpServletRequest aHttpRequest,
javax.servlet.http.HttpServletResponse aHttpResponse)
Dispatches client requests to the protected
service method. |
void |
service(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res) |
XServletSettings |
settings() |
String |
toString() |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModifiedpublic static final String REQUEST_ATTR_HANDLED_ASYNC
public static final String REQUEST_ATTR_SCOPE_CREATED
@Nonnull @ReturnsMutableObject protected final XServletHandlerRegistry handlerRegistry()
null.@Nonnull @ReturnsMutableObject protected final com.helger.commons.collection.impl.ICommonsList<IXServletLowLevelFilter> filterLowLevelList()
null.@Nonnull @ReturnsMutableObject protected final com.helger.commons.collection.impl.ICommonsList<IXServletHighLevelFilter> filterHighLevelList()
null.@Nonnull @ReturnsMutableObject protected final com.helger.commons.callback.CallbackList<IXServletExceptionHandler> exceptionHandler()
null.public final XServletSettings settings()
null.@Nonnull protected final ServletStatusManager getServletStatusMgr()
null.public final void log(String sMsg)
log in class javax.servlet.GenericServletpublic final void log(String sMsg, Throwable t)
log in class javax.servlet.GenericServletpublic final void init(@Nonnull javax.servlet.ServletConfig aSC) throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletjavax.servlet.ServletException@OverridingMethodsMustInvokeSuper public final void destroy()
destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServlet@OverrideOnDemand protected void logInvalidRequestSetup(@Nonnull String sMsg, @Nonnull javax.servlet.http.HttpServletRequest aHttpRequest)
sMsg - The concrete message to emit. May not be null.aHttpRequest - The current HTTP request. May not be null.protected final void service(@Nonnull javax.servlet.http.HttpServletRequest aHttpRequest, @Nonnull javax.servlet.http.HttpServletResponse aHttpResponse) throws javax.servlet.ServletException, IOException
service method.
There's no need to override this method.service in class javax.servlet.http.HttpServletaHttpRequest - the HttpServletRequest object that contains the request the
client made of the servletaHttpResponse - the HttpServletResponse object that contains the response the
servlet returns to the clientIOException - if an input or output error occurs while the servlet is handling
the HTTP requestjavax.servlet.ServletException - if the HTTP request cannot be handledServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)public final void service(@Nonnull javax.servlet.ServletRequest req, @Nonnull javax.servlet.ServletResponse res) throws javax.servlet.ServletException, IOException
service in interface javax.servlet.Servletservice in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionCopyright © 2017–2019 Philip Helger. All rights reserved.