Interface NetworkMetrics<C>
- All Superinterfaces:
Metrics
- All Known Subinterfaces:
DatagramSocketMetrics, TCPMetrics<C>, TransportMetrics<C>
An SPI used internally by Vert.x to gather metrics on a net socket which serves
as a base class for TCP, UDP or QUIC.
- Author:
- Nick Scavelli
-
Field Summary
Fields inherited from interface Metrics
METRICS_ENABLED -
Method Summary
Modifier and TypeMethodDescriptiondefault voidbytesRead(C connectionMetric, SocketAddress remoteAddress, long numberOfBytes) Called when bytes have been readdefault voidbytesWritten(C connectionMetric, SocketAddress remoteAddress, long numberOfBytes) Called when bytes have been writtendefault voidexceptionOccurred(C connectionMetric, SocketAddress remoteAddress, Throwable err) Called when exceptions occur for a specific connection.
-
Method Details
-
bytesRead
Called when bytes have been read- Parameters:
connectionMetric- the connection metric,nullfor UDPremoteAddress- the remote address which this socket received bytes fromnumberOfBytes- the number of bytes read
-
bytesWritten
Called when bytes have been written- Parameters:
connectionMetric- the connection metric,nullfor UDPremoteAddress- the remote address which bytes are being written tonumberOfBytes- the number of bytes written
-
exceptionOccurred
Called when exceptions occur for a specific connection.- Parameters:
connectionMetric- the connection metric,nullfor UDPremoteAddress- the remote address of the connection ornullif it's datagram/udperr- the exception that occurred
-