Class AccessLoggingRequestHandler
java.lang.Object
com.yahoo.jdisc.AbstractResource
com.yahoo.jdisc.handler.AbstractRequestHandler
com.yahoo.jdisc.http.server.jetty.AccessLoggingRequestHandler
- All Implemented Interfaces:
DelegatedRequestHandler,RequestHandler,SharedResource
public class AccessLoggingRequestHandler
extends AbstractRequestHandler
implements DelegatedRequestHandler
A wrapper RequestHandler that enables access logging. By wrapping the request handler, we are able to wrap the
response handler as well. Hence, we can populate the access log entry with information from both the request
and the response. This wrapper also adds the access log entry to the request context, so that request handlers
may add information to it.
Does not otherwise interfere with the request processing of the delegate request handler.
- Author:
- bakksjo, bjorncs
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.yahoo.jdisc.SharedResource
SharedResource.Debug -
Field Summary
FieldsFields inherited from interface com.yahoo.jdisc.SharedResource
DEBUG, SYSTEM_PROPERTY_NAME_DEBUG -
Constructor Summary
ConstructorsConstructorDescriptionAccessLoggingRequestHandler(org.eclipse.jetty.server.Request jettyRequest, RequestHandler delegateRequestHandler, AccessLogEntry accessLogEntry) -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<AccessLogEntry>getAccessLogEntry(HttpRequest jdiscRequest) static Optional<AccessLogEntry>getAccessLogEntry(Map<String, Object> requestContextMap) handleRequest(Request request, ResponseHandler handler) Methods inherited from class com.yahoo.jdisc.handler.AbstractRequestHandler
handleTimeoutMethods inherited from class com.yahoo.jdisc.AbstractResource
currentState, destroy, refer, refer, release, retainCountMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.yahoo.jdisc.handler.DelegatedRequestHandler
getDelegateRecursiveMethods inherited from interface com.yahoo.jdisc.handler.RequestHandler
handleTimeoutMethods inherited from interface com.yahoo.jdisc.SharedResource
refer, refer, release
-
Field Details
-
CONTEXT_KEY_ACCESS_LOG_ENTRY
-
-
Constructor Details
-
AccessLoggingRequestHandler
public AccessLoggingRequestHandler(org.eclipse.jetty.server.Request jettyRequest, RequestHandler delegateRequestHandler, AccessLogEntry accessLogEntry)
-
-
Method Details
-
getAccessLogEntry
-
getAccessLogEntry
-
handleRequest
- Specified by:
handleRequestin interfaceRequestHandler
-
getDelegate
- Specified by:
getDelegatein interfaceDelegatedRequestHandler
-