Top Description Fields Constructors Methods
reactor.netty.http.server.logging

pack-priv abstract Class AbstractAccessLogArgProvider<SELF extends reactor.netty.http.server.logging.AbstractAccessLogArgProvider<SELF>>

extends Object
implements AccessLogArgProvider, Supplier<SELF extends AbstractAccessLogArgProvider<SELF>>
Class Inheritance
All Implemented Interfaces
java.util.function.Supplier, reactor.netty.http.server.logging.AccessLogArgProvider
Known Direct Subclasses
reactor.netty.http.server.logging.AccessLogArgProviderH1, reactor.netty.http.server.logging.AccessLogArgProviderH2
Imports
io.netty.handler.codec.http.HttpMethod, io.netty.handler.codec.http.cookie.Cookie, reactor.netty.ReactorNetty, reactor.netty.http.server.ConnectionInformation, reactor.util.annotation.Nullable, java.net.SocketAddress, java.time.ZonedDateTime, java.time.format.DateTimeFormatter, java.util.Map, .Set, java.util.function.Supplier

A provider of the args required for access log.
Author
limaoning

Field Summary

Modifier and TypeField and Description
pack-priv ZonedDateTime
pack-priv boolean
pack-priv ConnectionInformation
pack-priv long
pack-priv Map<CharSequence, Set<Cookie>>
pack-priv static final DateTimeFormatter
pack-priv CharSequence
pack-priv static final String
pack-priv String
pack-priv final SocketAddress
pack-priv long
pack-priv CharSequence
pack-priv final String
pack-priv String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ZonedDateTime
accessDateTime()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.accessDateTime.

Returns the date-time of the moment when the request was received.
pack-priv SELF
chunked(boolean chunked)

pack-priv void
clear()

Remove non-final fields for reuse.

public ConnectionInformation
connectionInformation()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.connectionInformation.

Returns the information about the current connection.
pack-priv SELF
public long
public Map<CharSequence, Set<Cookie>>
cookies()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.cookies.

Returns resolved HTTP cookies.
pack-priv SELF
public long
duration()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.duration.

Returns the request/response duration.
pack-priv SELF
increaseContentLength(long contentLength)

public CharSequence
method()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.method.

Returns the name of this method, (e.g. "GET").
pack-priv void
onRequest()

Initialize some fields (e.g. ZonedDateTime startTime).

public String
protocol()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.protocol.

Returns the protocol version, (e.g. "HTTP/1.1" or "HTTP/2.0").
public SocketAddress
remoteAddress()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.remoteAddress.

Returns the address of the remote peer or null in case of Unix Domain Sockets.
public CharSequence
uri()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.uri.

Returns the requested URI, (e.g. "/hello").
public String
user()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.user.

Returns the user identifier.
public String
zonedDateTime()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.zonedDateTime.

Deprecated
Returns the date-time string with a time-zone, (e.g. "30/Oct/2020:03:52:11 +0000").
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

accessDateTimeback to summary
pack-priv ZonedDateTime accessDateTime
chunkedback to summary
pack-priv boolean chunked
connectionInfoback to summary
pack-priv ConnectionInformation connectionInfo
contentLengthback to summary
pack-priv long contentLength
cookiesback to summary
pack-priv Map<CharSequence, Set<Cookie>> cookies
DATE_TIME_FORMATTERback to summary
pack-priv static final DateTimeFormatter DATE_TIME_FORMATTER
methodback to summary
pack-priv CharSequence method
MISSINGback to summary
pack-priv static final String MISSING
protocolback to summary
pack-priv String protocol
remoteAddressback to summary
pack-priv final SocketAddress remoteAddress
startTimeback to summary
pack-priv long startTime
uriback to summary
pack-priv CharSequence uri
userback to summary
pack-priv final String user
zonedDateTimeback to summary
pack-priv String zonedDateTime

Constructor Detail

AbstractAccessLogArgProviderback to summary
pack-priv AbstractAccessLogArgProvider(SocketAddress remoteAddress)

Method Detail

accessDateTimeback to summary
public ZonedDateTime accessDateTime()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.accessDateTime.

Doc from reactor.netty.http.server.logging.AccessLogArgProvider.accessDateTime.

Returns the date-time of the moment when the request was received.

Returns:ZonedDateTime

zoned date-time

Annotations
@Override
@Nullable
chunkedback to summary
pack-priv SELF chunked(boolean chunked)
clearback to summary
pack-priv void clear()

Remove non-final fields for reuse.

connectionInformationback to summary
public ConnectionInformation connectionInformation()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.connectionInformation.

Doc from reactor.netty.http.server.logging.AccessLogArgProvider.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:ConnectionInformation

the connection info

Annotations
@Override
@Nullable
connectionInformationback to summary
pack-priv SELF connectionInformation(ConnectionInformation connectionInfo)
contentLengthback to summary
public long contentLength()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.contentLength.

Doc from reactor.netty.http.server.logging.AccessLogArgProvider.contentLength.

Returns the response content length.

Returns:long

the response content length

Annotations
@Override
cookiesback to summary
public Map<CharSequence, Set<Cookie>> cookies()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.cookies.

Doc from reactor.netty.http.server.logging.AccessLogArgProvider.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:Map<CharSequence, Set<Cookie>>

Resolved HTTP cookies

Annotations
@Override
@Nullable
cookiesback to summary
pack-priv SELF cookies(Map<CharSequence, Set<Cookie>> cookies)
durationback to summary
public long duration()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.duration.

Doc from reactor.netty.http.server.logging.AccessLogArgProvider.duration.

Returns the request/response duration.

Returns:long

the request/response duration in milliseconds

Annotations
@Override
increaseContentLengthback to summary
pack-priv SELF increaseContentLength(long contentLength)
methodback to summary
public CharSequence method()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.method.

Doc from reactor.netty.http.server.logging.AccessLogArgProvider.method.

Returns the name of this method, (e.g. "GET").

Returns:CharSequence

the name of this method

Annotations
@Override
@Nullable
onRequestback to summary
pack-priv void onRequest()

Initialize some fields (e.g. ZonedDateTime startTime). Should be called when a new request is received.

protocolback to summary
public String protocol()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.protocol.

Doc from reactor.netty.http.server.logging.AccessLogArgProvider.protocol.

Returns the protocol version, (e.g. "HTTP/1.1" or "HTTP/2.0").

Returns:String

the protocol version

Annotations
@Override
@Nullable
remoteAddressback to summary
public SocketAddress remoteAddress()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.remoteAddress.

Doc from reactor.netty.http.server.logging.AccessLogArgProvider.remoteAddress.

Returns the address of the remote peer or null in case of Unix Domain Sockets.

Returns:SocketAddress

the peer's address

Annotations
@Override
@Nullable
@SuppressWarnings:deprecation
uriback to summary
public CharSequence uri()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.uri.

Doc from reactor.netty.http.server.logging.AccessLogArgProvider.uri.

Returns the requested URI, (e.g. "/hello").

Returns:CharSequence

the requested URI

Annotations
@Override
@Nullable
userback to summary
public String user()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.user.

Doc from reactor.netty.http.server.logging.AccessLogArgProvider.user.

Returns the user identifier.

Returns:String

the user identifier

Annotations
@Override
@Nullable
zonedDateTimeback to summary
public String zonedDateTime()

Implements reactor.netty.http.server.logging.AccessLogArgProvider.zonedDateTime.

Doc from reactor.netty.http.server.logging.AccessLogArgProvider.zonedDateTime.

Deprecated

Returns the date-time string with a time-zone, (e.g. "30/Oct/2020:03:52:11 +0000").

Returns:String

the date-time string with a time-zone

Annotations
@Override
@Nullable
@Deprecated