Interface Instrumenter

All Known Implementing Classes:
CountingInstrumenter, ThreadSafeCountingInstrumenter

public interface Instrumenter
A generic interface that allows the HTTP Server to be instrumented.
Author:
Brian Pontarelli
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when a new client connection is accepted by the HTTP server.
    void
    Called when a new request is accepted by an HTTP worker.
    void
    Called when a client sends in a bad HTTP request.
    void
    Called when a client sends in chunked request data.
    void
    Called when a client sends in chunked request data.
    void
    Called when a connection is closed due to an issue or a timeout.
    void
    readFromClient(long bytes)
    Called when bytes are read from a client.
    void
    Called when the server listener is started.
    void
    Signals that an HTTP worker has been started.
    void
    Signals that an HTTP worker has been stopped.
    void
    wroteToClient(long bytes)
    Called when bytes are written to a client.
  • Method Details

    • acceptedConnection

      void acceptedConnection()
      Called when a new client connection is accepted by the HTTP server.
    • acceptedRequest

      void acceptedRequest()
      Called when a new request is accepted by an HTTP worker.
    • badRequest

      void badRequest()
      Called when a client sends in a bad HTTP request. A bad request is one that cannot be handled by the HTTP server.
    • chunkedRequest

      void chunkedRequest()
      Called when a client sends in chunked request data.
    • chunkedResponse

      void chunkedResponse()
      Called when a client sends in chunked request data.
    • connectionClosed

      void connectionClosed()
      Called when a connection is closed due to an issue or a timeout. This should not count connections closed in expected conditions such as a keep-alive timeout.
    • readFromClient

      void readFromClient(long bytes)
      Called when bytes are read from a client.
      Parameters:
      bytes - The number of bytes read.
    • serverStarted

      void serverStarted()
      Called when the server listener is started. If you have a single listener, you will have one server started. If you have two listeners, one for HTTP and one for HTTPS, you will have two servers started.
    • workerStarted

      void workerStarted()
      Signals that an HTTP worker has been started.
    • workerStopped

      void workerStopped()
      Signals that an HTTP worker has been stopped.
    • wroteToClient

      void wroteToClient(long bytes)
      Called when bytes are written to a client.
      Parameters:
      bytes - The number of bytes written.