public class AccessLogProbe extends HttpServerProbe.Adapter
HttpServerProbe.Adapter
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_STATUS_THRESHOLD
The minimum response status that will trigger an entry
in an access log configured by this instance (default, log everything).
|
Constructor and Description |
---|
AccessLogProbe(AccessLogAppender appender,
AccessLogFormat format)
Create a new
AccessLogProbe formatting data with the specified
format and appending it to the specified
appender. |
AccessLogProbe(AccessLogAppender appender,
AccessLogFormat format,
int statusThreshold)
Create a new
AccessLogProbe formatting data with the specified
format and appending it to the specified
appender. |
Modifier and Type | Method and Description |
---|---|
void |
onRequestCompleteEvent(HttpServerFilter filter,
Connection connection,
Response response)
Receive notification of the completion of a
Response an possibly
trigger an access log entry generation. |
void |
onRequestReceiveEvent(HttpServerFilter filter,
Connection connection,
Request request)
Instrument the specified
Request with an attribute marking its
received time (in nanoseconds). |
onBeforeServiceEvent, onRequestCancelEvent, onRequestResumeEvent, onRequestSuspendEvent, onRequestTimeoutEvent
public static final int DEFAULT_STATUS_THRESHOLD
public AccessLogProbe(AccessLogAppender appender, AccessLogFormat format)
AccessLogProbe
formatting data with the specified
format and appending it to the specified
appender.public AccessLogProbe(AccessLogAppender appender, AccessLogFormat format, int statusThreshold)
AccessLogProbe
formatting data with the specified
format and appending it to the specified
appender.
Only responses with status over the specified threshold will
be logged, for example a threshold of 500
will only
generate log entries for requests that terminated in error.
public void onRequestReceiveEvent(HttpServerFilter filter, Connection connection, Request request)
Request
with an attribute marking its
received time (in nanoseconds).onRequestReceiveEvent
in interface HttpServerProbe
onRequestReceiveEvent
in class HttpServerProbe.Adapter
filter
- HttpServerFilter
, the event belongs to.connection
- Connection
, the event belongs to.request
- received Request
.public void onRequestCompleteEvent(HttpServerFilter filter, Connection connection, Response response)
Response
an possibly
trigger an access log entry generation.onRequestCompleteEvent
in interface HttpServerProbe
onRequestCompleteEvent
in class HttpServerProbe.Adapter
filter
- HttpServerFilter
, the event belongs to.connection
- Connection
, the event belongs to.response
- sent Response
.Copyright © 2015 Oracle Corporation. All rights reserved.