Interface NetworkTrafficListener


public interface NetworkTrafficListener

A listener for raw network traffic within Jetty.

NetworkTrafficListeners can be installed in a org.eclipse.jetty.server.NetworkTrafficServerConnector, and are notified of the following network traffic events:

  • Connection opened, when the server has accepted the connection from a remote client
  • Incoming bytes, when the server receives bytes sent from a remote client
  • Outgoing bytes, when the server sends bytes to a remote client
  • Connection closed, when the server has closed the connection to a remote client

NetworkTrafficListeners can be used to log the network traffic viewed by a Jetty server (for example logging to filesystem) for activities such as debugging or request/response cycles or for replaying request/response cycles to other servers.