Package io.vertx.core.net.endpoint

## Interface InteractionMetrics<M>

- All Known Implementing Classes:
    `DefaultInteractionMetrics`

      @Unstable
      public interface InteractionMetrics<M>

  Gather metrics for a request/response interaction with the server, this interface is write-only and used to report usage to build statistics for a load balancing purpose.
  Author:
    Julien Viet

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static InteractionMetrics<?>` | `INSTANCE` |

  - ### Method Summary

    All Methods Instance Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `default M` | `initiateRequest()` | Initiate a request
    `default void` | `reportFailure​(M metric, Throwable failure)` | Signal the failure of a request/response to the `metric`
    `default void` | `reportRequestBegin​(M metric)` | Signal the beginning of the request attached to the `metric`
    `default void` | `reportRequestEnd​(M metric)` | Signal the end of the request attached to the `metric`
    `default void` | `reportResponseBegin​(M metric)` | Signal the beginning of the response attached to the `metric`
    `default void` | `reportResponseEnd​(M metric)` | Signal the end of the response attached to the `metric`

- - ### Field Detail

    - #### INSTANCE

          static final InteractionMetrics<?> INSTANCE

  - ### Method Detail

    - #### initiateRequest

          default M initiateRequest()

      Initiate a request
      Returns:
        the request metric

    - #### reportFailure

          default void reportFailure​(M metric,
                                     Throwable failure)

      Signal the failure of a request/response to the `metric`
      Parameters:
        `metric` - the request metric
        `failure` - the failure

    - #### reportRequestBegin

          default void reportRequestBegin​(M metric)

      Signal the beginning of the request attached to the `metric`
      Parameters:
        `metric` - the request/response metric

    - #### reportRequestEnd

          default void reportRequestEnd​(M metric)

      Signal the end of the request attached to the `metric`
      Parameters:
        `metric` - the request/response metric

    - #### reportResponseBegin

          default void reportResponseBegin​(M metric)

      Signal the beginning of the response attached to the `metric`
      Parameters:
        `metric` - the request/response metric

    - #### reportResponseEnd

          default void reportResponseEnd​(M metric)

      Signal the end of the response attached to the `metric`
      Parameters:
        `metric` - the request metric