Package io.vertx.core.spi.metrics
Interface NetworkMetrics<S>
-
- All Superinterfaces:
Metrics
- All Known Subinterfaces:
DatagramSocketMetrics
,HttpClientMetrics<R,W,S>
,HttpServerMetrics<R,W,S>
,TCPMetrics<S>
public interface NetworkMetrics<S> extends Metrics
An SPI used internally by Vert.x to gather metrics on a net socket which serves as a base class for TCP or UDP.- Author:
- Nick Scavelli
-
-
Field Summary
-
Fields inherited from interface io.vertx.core.spi.metrics.Metrics
METRICS_ENABLED
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
bytesRead(S socketMetric, SocketAddress remoteAddress, long numberOfBytes)
Called when bytes have been readdefault void
bytesWritten(S socketMetric, SocketAddress remoteAddress, long numberOfBytes)
Called when bytes have been writtendefault void
exceptionOccurred(S socketMetric, SocketAddress remoteAddress, Throwable t)
Called when exceptions occur for a specific connection.
-
-
-
Method Detail
-
bytesRead
default void bytesRead(S socketMetric, SocketAddress remoteAddress, long numberOfBytes)
Called when bytes have been read- Parameters:
socketMetric
- the socket metric, null for UDPremoteAddress
- the remote address which this socket received bytes fromnumberOfBytes
- the number of bytes read
-
bytesWritten
default void bytesWritten(S socketMetric, SocketAddress remoteAddress, long numberOfBytes)
Called when bytes have been written- Parameters:
socketMetric
- the socket metric, null for UDPremoteAddress
- the remote address which bytes are being written tonumberOfBytes
- the number of bytes written
-
exceptionOccurred
default void exceptionOccurred(S socketMetric, SocketAddress remoteAddress, Throwable t)
Called when exceptions occur for a specific connection.- Parameters:
socketMetric
- the socket metric, null for UDPremoteAddress
- the remote address of the connection or null if it's datagram/udpt
- the exception that occurred
-
-