All Known Implementing Classes:
ConstantElement

public interface LogElement
Represents a http request or response element.
Since:
2.0
Author:
croudet
  • Method Details

    • events

      The sets of events that this log element must process. Empty for ConstantElement.
      Returns:
      A list of events.
    • reset

      default void reset()
      Reset the computed value.
    • onRequestHeaders

      @Deprecated default String onRequestHeaders(io.netty.channel.socket.SocketChannel channel, String method, io.netty.handler.codec.http.HttpHeaders headers, String uri, String protocol)
      Deprecated.
      Does not work for unix or embedded channels. Please implement and use onRequestHeaders(ConnectionMetadata, String, HttpHeaders, String, String) instead.
      Responds to an ON_REQUEST_HEADERS event. Also used for ConstantElement with all parameters as null.
      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.
    • onRequestHeaders

      default String onRequestHeaders(@NonNull @NonNull ConnectionMetadata metadata, @NonNull @NonNull String method, @NonNull @NonNull io.netty.handler.codec.http.HttpHeaders headers, @NonNull @NonNull String uri, @NonNull @NonNull String protocol)
      Responds to an ON_REQUEST_HEADERS event. Also used for ConstantElement with all parameters as null.
      Parameters:
      metadata - The connection metadata.
      method - The http method.
      headers - The request headers.
      uri - The request uri.
      protocol - The request protocol.
      Returns:
      The processed value.
    • onResponseHeaders

      default String onResponseHeaders(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpHeaders headers, String status)
      Responds to an ON_RESPONSE_HEADERS event.
      Parameters:
      ctx - The ChannelHandlerContext.
      headers - The response headers.
      status - The response status.
      Returns:
      The processed value.
    • onResponseWrite

      default void onResponseWrite(int bytesSent)
      Responds to an ON_RESPONSE_WRITE event.
      Parameters:
      bytesSent - The number of bytes sent.
    • onLastResponseWrite

      default String onLastResponseWrite(int bytesSent)
      Responds to an ON_LAST_RESPONSE_WRITE event.
      Parameters:
      bytesSent - The number of bytes sent.
      Returns:
      The processed value.
    • copy

      LogElement copy()
      Copy this log element when it is not stateless.
      Returns:
      A copy of this log element.