Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      LogElement copy()
      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.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)
      Responds to an ON_REQUEST_HEADERS event.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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: LogElement
        Responds to an ON_REQUEST_HEADERS event. Also used for ConstantElement with all parameters as null.
        Specified by:
        onRequestHeaders in interface LogElement
        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: LogElement
        The sets of events that this log element must process. Empty for ConstantElement.
        Specified by:
        events in interface LogElement
        Returns:
        A list of events.
      • copy

        public LogElement copy()
        Description copied from interface: LogElement
        Copy this log element when it is not stateless.
        Specified by:
        copy in interface LogElement
        Returns:
        A copy of this log element.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object