Interface TcpAppenderListener<Event extends DeferredProcessingAware>

All Superinterfaces:
AppenderListener<Event>
All Known Implementing Classes:
AccessEventTcpAppenderListenerImpl, FailureSummaryAppenderListener, FailureSummaryLoggingAppenderListener, LoggingEventTcpAppenderListenerImpl

public interface TcpAppenderListener<Event extends DeferredProcessingAware> extends AppenderListener<Event>
Listens to a TCP appender. Methods will be invoked in the thread that is sending the events over the TCP connection. Therefore, ensure that the methods complete quickly, so that future events are not delayed.
  • Method Details

    • eventSent

      default void eventSent(Appender<Event> appender, Socket socket, Event event, long durationInNanos)
      Called after given appender successfully sent the given event over the TCP connection.
      Parameters:
      appender - the appender that sent the event
      socket - the socket over which the appender sent the event
      event - the event that was sent
      durationInNanos - the time (in nanoseconds) it took to send the event
    • eventSendFailure

      default void eventSendFailure(Appender<Event> appender, Event event, Throwable reason)
      Called when the given appender fails to send the given event over a TCP connection.
      Parameters:
      appender - the appender that attempted to send the event
      event - the event that failed to send
      reason - what caused the failure
    • connectionOpened

      default void connectionOpened(Appender<Event> appender, Socket socket)
      Called after the given appender successfully opens the given socket
      Parameters:
      appender - the appender that opened the socket
      socket - the socket that was opened
    • connectionFailed

      default void connectionFailed(Appender<Event> appender, InetSocketAddress address, Throwable reason)
      Called after the given appender fails to open a socket
      Parameters:
      appender - the appender that attempted to open a socket
      address - the address to which the appender attempted to connect
      reason - what caused the failure
    • connectionClosed

      default void connectionClosed(Appender<Event> appender, Socket socket)
      Called after the given appender closes the given socket (either due to a reconnect, or shutdown)
      Parameters:
      appender - the appender that closed the socket
      socket - the socket that was closed