Class ConditionalHandler.ElseNext
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.server.Handler.Abstract
org.eclipse.jetty.server.Handler.AbstractContainer
org.eclipse.jetty.server.Handler.Wrapper
org.eclipse.jetty.server.handler.ConditionalHandler
org.eclipse.jetty.server.handler.ConditionalHandler.ElseNext
- All Implemented Interfaces:
Handler, Handler.Container, Handler.Singleton, Request.Handler, Container, Destroyable, Dumpable, Dumpable.DumpableContainer, LifeCycle, Invocable
- Direct Known Subclasses:
ConditionalHandler.DontHandle, ConditionalHandler.Reject, ConditionalHandler.SkipNext
- Enclosing class:
ConditionalHandler
An abstract implementation of
ConditionalHandler
that, if conditions are not met, will call
the ConditionalHandler.nextHandler(Request, Response, Callback)
from onConditionsNotMet(Request, Response, Callback)
.
Implementations must provide an ConditionalHandler.onConditionsMet(Request, Response, Callback)
to provide the
handling for when conditions are met.-
Nested Class Summary
Nested classes/interfaces inherited from class ConditionalHandler
ConditionalHandler.Abstract, ConditionalHandler.ConnectorPredicate, ConditionalHandler.DontHandle, ConditionalHandler.ElseNext, ConditionalHandler.InetAddressPatternPredicate, ConditionalHandler.MethodPredicate, ConditionalHandler.PathSpecPredicate, ConditionalHandler.PredicateSet, ConditionalHandler.Reject, ConditionalHandler.SkipNext
Nested classes/interfaces inherited from class Handler.Abstract
Handler.Abstract.NonBlocking
Nested classes/interfaces inherited from class AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopException
Nested classes/interfaces inherited from interface Container
Container.InheritedListener, Container.Listener
Nested classes/interfaces inherited from interface Dumpable
Dumpable.DumpableContainer
Nested classes/interfaces inherited from interface Handler
Handler.AbstractContainer, Handler.Collection, Handler.Container, Handler.Sequence, Handler.Singleton, Handler.Wrapper
Nested classes/interfaces inherited from interface Invocable
Invocable.Callable, Invocable.InvocationType, Invocable.ReadyTask, Invocable.Task
Nested classes/interfaces inherited from interface LifeCycle
LifeCycle.Listener
Nested classes/interfaces inherited from interface Request.Handler
Request.Handler.AbortException
-
Field Summary
Fields inherited from interface Invocable
__nonBlocking, NOOP
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
onConditionsNotMet
(Request request, Response response, Callback callback) This method is called when the request has not met the conditions and is not to be handled by this handler.Methods inherited from class ConditionalHandler
clear, doStart, dump, exclude, exclude, exclude, excludeInetAddressPattern, excludeMethod, excludePath, from, from, handle, include, include, include, includeInetAddressPattern, includeMethod, includePath, nextHandler, onConditionsMet
Methods inherited from class Handler.Wrapper
getHandler, getInvocationType, setHandler
Methods inherited from class Handler.AbstractContainer
findContainerOf, getDescendant, getDescendants, isDynamic, setDynamic, setServer
Methods inherited from class Handler.Abstract
destroy, doStop, getServer
Methods inherited from class ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, installBean, installBean, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeans
Methods inherited from class AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop, toString
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface Container
getCachedBeans, getEventListeners
Methods inherited from interface Destroyable
destroy
Methods inherited from interface Dumpable.DumpableContainer
isDumpable
Methods inherited from interface Handler.Container
getContainer, getDescendant, getDescendants, getDescendants
Methods inherited from interface Handler.Singleton
getHandlers, getTail, insertHandler, setHandler
Methods inherited from interface LifeCycle
addEventListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, start, stop
-
Constructor Details
-
ElseNext
public ElseNext() -
ElseNext
-
-
Method Details
-
onConditionsNotMet
protected boolean onConditionsNotMet(Request request, Response response, Callback callback) throws Exception Description copied from class:ConditionalHandler
This method is called when the request has not met the conditions and is not to be handled by this handler. Implementations may return false; send an error response; or handle the request differently.- Specified by:
onConditionsNotMet
in classConditionalHandler
- Parameters:
request
- The request to handleresponse
- The response to generatecallback
- The callback for completion- Returns:
- True if this handler will complete the callback
- Throws:
Exception
- If there is a problem handling- See Also:
-