Interface TransportMetrics<C>

All Superinterfaces:
Metrics, NetworkMetrics<C>
All Known Subinterfaces:
TCPMetrics<C>

public interface TransportMetrics<C> extends NetworkMetrics<C>

An SPI used internally by Vert.x to gather metrics on a socket transport which serves as a base class for things like HttpServer and HttpClient, all of which serve connections.

Transport can be TCP or QUIC.

Author:
Nick Scavelli
  • Field Summary

    Fields inherited from interface Metrics

    METRICS_ENABLED
  • Method Summary

    Modifier and Type
    Method
    Description
    default C
    connected(SocketAddress remoteAddress, String remoteName)
    Called when a client has connected, which is applicable for connections.
    default void
    disconnected(C connectionMetric, SocketAddress remoteAddress)
    Called when a client has disconnected, which is applicable for connections.
    default void
    streamClosed(C connectionMetric)
    Called when a connection has closed a stream, only applicable for Quic connections
    default void
    streamOpened(C connectionMetric)
    Called when a connection has opened a stream, only applicable for Quic connections

    Methods inherited from interface Metrics

    close

    Methods inherited from interface NetworkMetrics

    bytesRead, bytesWritten, exceptionOccurred
  • Method Details

    • connected

      default C connected(SocketAddress remoteAddress, String remoteName)
      Called when a client has connected, which is applicable for connections.

      The remote name of the client is a best effort to provide the name of the remote host, i.e. if the name is specified at creation time, this name will be used otherwise it will be the remote address.

      Parameters:
      remoteAddress - the remote address of the client
      remoteName - the remote name of the client
      Returns:
      the connection metric
    • disconnected

      default void disconnected(C connectionMetric, SocketAddress remoteAddress)
      Called when a client has disconnected, which is applicable for connections.
      Parameters:
      connectionMetric - the connection metric
      remoteAddress - the remote address of the client
    • streamOpened

      default void streamOpened(C connectionMetric)
      Called when a connection has opened a stream, only applicable for Quic connections
      Parameters:
      connectionMetric - the connection metric
    • streamClosed

      default void streamClosed(C connectionMetric)
      Called when a connection has closed a stream, only applicable for Quic connections
      Parameters:
      connectionMetric - the connection metric