Interface AccessLogArgProvider
public interface AccessLogArgProvider
A provider of the args required for access log.
- Since:
 - 1.0.1
 - Author:
 - limaoning
 
- 
Method Summary
Modifier and TypeMethodDescription@Nullable ZonedDateTimeReturns the date-time of the moment when the request was received.@Nullable ConnectionInformationReturns the information about the current connection.longReturns the response content length.@Nullable Map<CharSequence,Set<Cookie>> cookies()Returns resolved HTTP cookies.longduration()Returns the request/response duration.@Nullable CharSequencemethod()Returns the name of this method, (e.g.@Nullable Stringprotocol()Returns the protocol version, (e.g.@Nullable SocketAddressDeprecated.as of 1.0.26.@Nullable CharSequencerequestHeader(CharSequence name) Returns the value of a request header with the specified name ornullis case such request header does not exist.default @Nullable Iterator<Map.Entry<CharSequence,CharSequence>> Returns an iterator over all request headers.@Nullable CharSequenceresponseHeader(CharSequence name) Returns the value of a response header with the specified name ornullis case such response header does not exist.default @Nullable Iterator<Map.Entry<CharSequence,CharSequence>> Returns an iterator over all response headers.@Nullable CharSequencestatus()Returns the response status, (e.g.@Nullable CharSequenceuri()Returns the requested URI, (e.g.@Nullable Stringuser()Returns the user identifier.@Nullable StringDeprecated.as of 1.0.6. 
- 
Method Details
- 
zonedDateTime
Deprecated.as of 1.0.6. Prefer usingaccessDateTime()This method will be removed in version 1.2.0.Returns the date-time string with a time-zone, (e.g. "30/Oct/2020:03:52:11 +0000").- Returns:
 - the date-time string with a time-zone
 
 - 
accessDateTime
@Nullable ZonedDateTime accessDateTime()Returns the date-time of the moment when the request was received.- Returns:
 - zoned date-time
 - Since:
 - 1.0.6
 
 - 
remoteAddress
Deprecated.as of 1.0.26. UseConnectionInformation.connectionRemoteAddress()Returns the address of the remote peer ornullin case of Unix Domain Sockets.- Returns:
 - the peer's address
 
 - 
connectionInformation
@Nullable ConnectionInformation connectionInformation()Returns the information about the current connection.Note that the
ConnectionInformation.remoteAddress()will return the forwarded remote client address if the server is configured in forwarded mode.- Returns:
 - the connection info
 - Since:
 - 1.0.26
 - See Also:
 
 - 
method
@Nullable CharSequence method()Returns the name of this method, (e.g. "GET").- Returns:
 - the name of this method
 
 - 
uri
@Nullable CharSequence uri()Returns the requested URI, (e.g. "/hello").- Returns:
 - the requested URI
 
 - 
protocol
@Nullable String protocol()Returns the protocol version, (e.g. "HTTP/1.1" or "HTTP/2.0").- Returns:
 - the protocol version
 
 - 
user
@Nullable String user()Returns the user identifier.- Returns:
 - the user identifier
 
 - 
status
@Nullable CharSequence status()Returns the response status, (e.g. 200).- Returns:
 - the response status
 
 - 
contentLength
long contentLength()Returns the response content length.- Returns:
 - the response content length
 
 - 
duration
long duration()Returns the request/response duration.- Returns:
 - the request/response duration in milliseconds
 
 - 
requestHeader
Returns the value of a request header with the specified name ornullis case such request header does not exist.- Parameters:
 name- the request header name- Returns:
 - the value of the request header
 
 - 
responseHeader
Returns the value of a response header with the specified name ornullis case such response header does not exist.- Parameters:
 name- the response header name- Returns:
 - the value of the response header
 - Since:
 - 1.0.4
 
 - 
cookies
@Nullable Map<CharSequence,Set<Cookie>> cookies()Returns resolved HTTP cookies.Warning: Be cautious with cookies information and what kind of sensitive data is written to the logs. By default, no cookies information is written to the access log.
- Returns:
 - Resolved HTTP cookies
 - Since:
 - 1.0.6
 
 - 
requestHeaderIterator
Returns an iterator over all request headers.- Returns:
 - an iterator over all request headers or 
nullif request is not available - Since:
 - 1.2.6
 
 - 
responseHeaderIterator
Returns an iterator over all response headers.- Returns:
 - an iterator over all response headers or 
nullif response is not available - Since:
 - 1.2.6
 
 
 -