Class ConstantElement
- java.lang.Object
-
- io.micronaut.http.server.netty.handler.accesslog.element.ConstantElement
-
- All Implemented Interfaces:
LogElement
public final class ConstantElement extends java.lang.Object implements LogElement
ConstantElement LogElement. Represents a fixed value.- Since:
- 2.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.micronaut.http.server.netty.handler.accesslog.element.LogElement
LogElement.Event
-
-
Field Summary
Fields Modifier and Type Field Description static ConstantElementUNKNOWNThe unknown LogElement.static java.lang.StringUNKNOWN_VALUEThe unknown value: '-'.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LogElementcopy()Copy this log element when it is not stateless.java.util.Set<LogElement.Event>events()The sets of events that this log element must process.java.lang.StringonRequestHeaders(io.netty.channel.socket.SocketChannel channel, java.lang.String method, io.netty.handler.codec.http.HttpHeaders headers, java.lang.String uri, java.lang.String protocol)Responds to an ON_REQUEST_HEADERS event.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.micronaut.http.server.netty.handler.accesslog.element.LogElement
onLastResponseWrite, onResponseHeaders, onResponseWrite, reset
-
-
-
-
Field Detail
-
UNKNOWN_VALUE
public static final java.lang.String UNKNOWN_VALUE
The unknown value: '-'.- See Also:
- Constant Field Values
-
UNKNOWN
public static final ConstantElement UNKNOWN
The unknown LogElement.
-
-
Method Detail
-
onRequestHeaders
public java.lang.String onRequestHeaders(io.netty.channel.socket.SocketChannel channel, java.lang.String method, io.netty.handler.codec.http.HttpHeaders headers, java.lang.String uri, java.lang.String protocol)Description copied from interface:LogElementResponds to an ON_REQUEST_HEADERS event. Also used for ConstantElement with all parameters as null.- Specified by:
onRequestHeadersin interfaceLogElement- Parameters:
channel- The socket channel.method- The http method.headers- The request headers.uri- The request uri.protocol- The request protocol.- Returns:
- The processed value.
-
events
public java.util.Set<LogElement.Event> events()
Description copied from interface:LogElementThe sets of events that this log element must process. Empty for ConstantElement.- Specified by:
eventsin interfaceLogElement- Returns:
- A list of events.
-
copy
public LogElement copy()
Description copied from interface:LogElementCopy this log element when it is not stateless.- Specified by:
copyin interfaceLogElement- Returns:
- A copy of this log element.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-