public class AppVersionHandlerMap
extends org.eclipse.jetty.server.handler.AbstractHandlerContainer
AppVersionHandlerMap is a HandlerContainer that identifies each child Handler with a particular AppVersionKey.
In order to identify which application version each request should be sent to, this class
assumes that an attribute will be set on the HttpServletRequest with a value of the
AppVersionKey that should be used.
org.eclipse.jetty.server.handler.AbstractHandler.ErrorDispatchHandlerorg.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListenerorg.eclipse.jetty.util.component.LifeCycle.Listener| Constructor and Description |
|---|
AppVersionHandlerMap(AppVersionHandlerFactory appVersionHandlerFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAppVersion(AppVersion appVersion) |
void |
addHandler(org.eclipse.jetty.server.Handler handler)
Not supported.
|
protected void |
doStart() |
protected void |
doStop() |
protected void |
expandChildren(List<org.eclipse.jetty.server.Handler> list,
Class<?> byClass) |
org.eclipse.jetty.server.Handler |
getHandler(AppVersionKey appVersionKey)
Returns the
Handler that will handle requests for the specified application version. |
org.eclipse.jetty.server.Handler[] |
getHandlers() |
void |
handle(String target,
org.eclipse.jetty.server.Request baseRequest,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Forward the specified request on to the
Handler associated with its application
version. |
void |
removeAppVersion(AppVersionKey appVersionKey) |
void |
removeHandler(org.eclipse.jetty.server.Handler handler)
Not supported.
|
void |
setHandlers(org.eclipse.jetty.server.Handler[] handlers)
Not supported.
|
void |
setServer(org.eclipse.jetty.server.Server server) |
void |
setSessionStoreFactory(SessionStoreFactory factory)
Sets the
SessionStoreFactory that will be used for generating the list of SessionStores that will be passed to SessionManager for apps for which
sessions are enabled. |
doShutdown, expandHandler, findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClassdestroy, doError, getServeraddBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, start, stop, stoppublic AppVersionHandlerMap(AppVersionHandlerFactory appVersionHandlerFactory)
public void addAppVersion(AppVersion appVersion)
public void removeAppVersion(AppVersionKey appVersionKey)
public void setSessionStoreFactory(SessionStoreFactory factory)
SessionStoreFactory that will be used for generating the list of SessionStores that will be passed to SessionManager for apps for which
sessions are enabled. This setter is currently used only for testing purposes. Normally the
default factory is sufficient.public org.eclipse.jetty.server.Handler getHandler(AppVersionKey appVersionKey) throws javax.servlet.ServletException
Handler that will handle requests for the specified application version.javax.servlet.ServletExceptionpublic void handle(String target, org.eclipse.jetty.server.Request baseRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
Handler associated with its application
version.handle in interface org.eclipse.jetty.server.Handlerhandle in class org.eclipse.jetty.server.handler.AbstractHandlerIOExceptionjavax.servlet.ServletExceptionprotected void doStart()
throws Exception
doStart in class org.eclipse.jetty.server.handler.AbstractHandlerExceptionprotected void doStop()
throws Exception
doStop in class org.eclipse.jetty.server.handler.AbstractHandlerExceptionpublic void setServer(org.eclipse.jetty.server.Server server)
setServer in interface org.eclipse.jetty.server.HandlersetServer in class org.eclipse.jetty.server.handler.AbstractHandlerContainerpublic org.eclipse.jetty.server.Handler[] getHandlers()
public void setHandlers(org.eclipse.jetty.server.Handler[] handlers)
UnsupportedOperationExceptionpublic void addHandler(org.eclipse.jetty.server.Handler handler)
UnsupportedOperationExceptionpublic void removeHandler(org.eclipse.jetty.server.Handler handler)
UnsupportedOperationExceptionCopyright © 2022. All rights reserved.