Interface TransportMetrics<C>
- All Superinterfaces:
Metrics, NetworkMetrics<C>
- All Known Subinterfaces:
TCPMetrics<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 TypeMethodDescriptiondefault Cconnected(SocketAddress remoteAddress, String remoteName) Called when a client has connected, which is applicable for connections.default voiddisconnected(C connectionMetric, SocketAddress remoteAddress) Called when a client has disconnected, which is applicable for connections.default voidstreamClosed(C connectionMetric) Called when a connection has closed a stream, only applicable for Quic connectionsdefault voidstreamOpened(C connectionMetric) Called when a connection has opened a stream, only applicable for Quic connectionsMethods inherited from interface NetworkMetrics
bytesRead, bytesWritten, exceptionOccurred
-
Method Details
-
connected
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 clientremoteName- the remote name of the client- Returns:
- the connection metric
-
disconnected
Called when a client has disconnected, which is applicable for connections.- Parameters:
connectionMetric- the connection metricremoteAddress- the remote address of the client
-
streamOpened
Called when a connection has opened a stream, only applicable for Quic connections- Parameters:
connectionMetric- the connection metric
-
streamClosed
Called when a connection has closed a stream, only applicable for Quic connections- Parameters:
connectionMetric- the connection metric
-