Interface LogElement
-
- All Known Implementing Classes:
ConstantElement
public interface LogElementRepresents a http request or response element.- Since:
- 2.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classLogElement.EventEvents.
-
Method Summary
All Methods Instance Methods Abstract Methods Default 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.default java.lang.StringonLastResponseWrite(int bytesSent)Responds to an ON_LAST_RESPONSE_WRITE event.default 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.default java.lang.StringonResponseHeaders(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpHeaders headers, java.lang.String status)Responds to an ON_RESPONSE_HEADERS event.default voidonResponseWrite(int bytesSent)Responds to an ON_RESPONSE_WRITE event.default voidreset()Reset the computed value.
-
-
-
Method Detail
-
events
java.util.Set<LogElement.Event> 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
default 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. 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.
-
onResponseHeaders
default java.lang.String onResponseHeaders(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpHeaders headers, java.lang.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 java.lang.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.
-
-