java.lang.Object
org.eclipse.jetty.util.Attributes.Wrapper
org.eclipse.jetty.server.Request.Wrapper
org.eclipse.jetty.rewrite.handler.Rule.Handler
- All Implemented Interfaces:
org.eclipse.jetty.io.Content.Source,org.eclipse.jetty.server.Request,org.eclipse.jetty.server.Request.Handler,org.eclipse.jetty.util.Attributes,org.eclipse.jetty.util.thread.Invocable
- Direct Known Subclasses:
Rule.HttpURIHandler
- Enclosing class:
Rule
public static class Rule.Handler
extends org.eclipse.jetty.server.Request.Wrapper
implements org.eclipse.jetty.server.Request.Handler
A Request.Wrapper that is also a Request.Handler,
used to chain a sequence of Rules together.
The rule handler is initialized with the initial request, then it is
passed to a chain of rules before the child Handler is
passed in setHandler(Handler). Finally, the response
and callback are provided in a call to handle(Request, Response, Callback),
which calls the handle(Response, Callback).
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Attributes
org.eclipse.jetty.util.Attributes.Layer, org.eclipse.jetty.util.Attributes.Lazy, org.eclipse.jetty.util.Attributes.Mapped, org.eclipse.jetty.util.Attributes.WrapperNested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.Invocable
org.eclipse.jetty.util.thread.Invocable.Callable, org.eclipse.jetty.util.thread.Invocable.InvocationType, org.eclipse.jetty.util.thread.Invocable.ReadyTask, org.eclipse.jetty.util.thread.Invocable.TaskNested classes/interfaces inherited from interface org.eclipse.jetty.server.Request
org.eclipse.jetty.server.Request.AuthenticationState, org.eclipse.jetty.server.Request.Handler, org.eclipse.jetty.server.Request.ServeAs, org.eclipse.jetty.server.Request.Wrapper -
Field Summary
Fields inherited from interface org.eclipse.jetty.util.Attributes
NULLFields inherited from interface org.eclipse.jetty.util.thread.Invocable
__nonBlocking, NOOPFields inherited from interface org.eclipse.jetty.server.Request
CACHE_ATTRIBUTE, COOKIE_ATTRIBUTE, DEFAULT_LOCALES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhandle(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, org.eclipse.jetty.util.Callback callback) protected booleanhandle(org.eclipse.jetty.server.Response response, org.eclipse.jetty.util.Callback callback) Handles this wrapped request together with the passed response and callback, using the handler set insetHandler(Handler).voidsetHandler(org.eclipse.jetty.server.Request.Handler handler) Wraps the givenHandlerwithin this instance and returns this instance.Methods inherited from class org.eclipse.jetty.server.Request.Wrapper
addFailureListener, addHttpStreamWrapper, addIdleTimeoutListener, consumeAvailable, demand, fail, getBeginNanoTime, getComponents, getConnectionMetaData, getContext, getHeaders, getHeadersNanoTime, getHttpURI, getId, getLength, getMethod, getSession, getTrailers, getTunnelSupport, getWrapped, isSecure, push, readMethods inherited from class org.eclipse.jetty.util.Attributes.Wrapper
clearAttributes, equals, getAttribute, getAttributeNameSet, hashCode, removeAttribute, setAttributeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.Attributes
asAttributeMap, clearAttributes, getAttribute, getAttributeNameSet, removeAttribute, setAttributeMethods inherited from interface org.eclipse.jetty.io.Content.Source
fail, rewindMethods inherited from interface org.eclipse.jetty.util.thread.Invocable
getInvocationType
-
Constructor Details
-
Handler
public Handler(org.eclipse.jetty.server.Request request)
-
-
Method Details
-
handle
public boolean handle(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response, org.eclipse.jetty.util.Callback callback) throws Exception - Specified by:
handlein interfaceorg.eclipse.jetty.server.Request.Handler- Throws:
Exception
-
handle
protected boolean handle(org.eclipse.jetty.server.Response response, org.eclipse.jetty.util.Callback callback) throws Exception Handles this wrapped request together with the passed response and callback, using the handler set in
setHandler(Handler). This method should be extended if additional handling of the wrapped request is required.- Parameters:
response- The responsecallback- The callback- Throws:
Exception- If there is a problem handling- See Also:
-
setHandler
public void setHandler(org.eclipse.jetty.server.Request.Handler handler) Wraps the given
Handlerwithin this instance and returns this instance.- Parameters:
handler- theHandlerto wrap
-