public abstract class AbstractModulesHandler extends AbstractHandlerCommons
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
Constructor and Description |
---|
AbstractModulesHandler() |
Modifier and Type | Method and Description |
---|---|
private void |
deliverModule(java.lang.String target,
javax.servlet.http.HttpServletResponse response)
Deliver a module directly from zip file that MUST be on CLASSPATH.
|
void |
handle(java.lang.String target,
org.eclipse.jetty.server.Request base,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Return a requested module if found or empty response and
HttpServletResponse.SC_NOT_FOUND if the module was not found. |
abstract boolean |
isModuleRequest(java.lang.String target,
org.eclipse.jetty.server.Request base,
javax.servlet.http.HttpServletRequest request)
Returns true if this handler is responsible for this request, otherwise false.
|
abstract java.lang.String |
mapToResource(java.lang.String target)
Maps the target of the request to its resource name.
|
detectContentType, sendResponse
destroy, doStart, doStop, dumpThis, getServer, setServer
addBean, addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
public abstract boolean isModuleRequest(java.lang.String target, org.eclipse.jetty.server.Request base, javax.servlet.http.HttpServletRequest request)
target
- The target of the request - either a URI or a name.base
- The base request.request
- The object or a wrapper of the request.public abstract java.lang.String mapToResource(java.lang.String target)
target
- The target of the request - either a URI or a name.public void handle(java.lang.String target, org.eclipse.jetty.server.Request base, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
HttpServletResponse.SC_NOT_FOUND
if the module was not found.target
- The target of the request - either a URI or a name.base
- The base request.request
- The object or a wrapper of the request.response
- The object or a wrapper of the response.java.io.IOException
javax.servlet.ServletException
private void deliverModule(java.lang.String target, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
target
- The target of the request - either a URI or a name.response
- The details and state of the response.java.io.IOException
- ServletException
If any error conditions occur.javax.servlet.ServletException