Top Description Fields Methods
io.vertx.core.spi.metrics

public Interface NetworkMetrics<S>

extends Metrics
Known Direct Subinterfaces
io.vertx.core.spi.metrics.TCPMetrics, io.vertx.core.spi.metrics.DatagramSocketMetrics
Imports
io.vertx.core.net.SocketAddress

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

Inherited from io.vertx.core.spi.metrics.Metrics:
DISABLE_METRICS_PROPERTY_NAMEMETRICS_ENABLED

Method Summary

Modifier and TypeMethod and Description
public default void
bytesRead(S
the socket metric, null for UDP
socketMetric
,
SocketAddress
the remote address which this socket received bytes from
remoteAddress
,
long
the number of bytes read
numberOfBytes
)

Called when bytes have been read

public default void
bytesWritten(S
the socket metric, null for UDP
socketMetric
,
SocketAddress
the remote address which bytes are being written to
remoteAddress
,
long
the number of bytes written
numberOfBytes
)

Called when bytes have been written

public default void
exceptionOccurred(S
the socket metric, null for UDP
socketMetric
,
SocketAddress
the remote address of the connection or null if it's datagram/udp
remoteAddress
,
Throwable
the exception that occurred
t
)

Called when exceptions occur for a specific connection.

Inherited from io.vertx.core.spi.metrics.Metrics:
close

Method Detail

bytesReadback to summary
public default void bytesRead(S socketMetric, SocketAddress remoteAddress, long numberOfBytes)

Called when bytes have been read

Parameters
socketMetric:S

the socket metric, null for UDP

remoteAddress:SocketAddress

the remote address which this socket received bytes from

numberOfBytes:long

the number of bytes read

bytesWrittenback to summary
public default void bytesWritten(S socketMetric, SocketAddress remoteAddress, long numberOfBytes)

Called when bytes have been written

Parameters
socketMetric:S

the socket metric, null for UDP

remoteAddress:SocketAddress

the remote address which bytes are being written to

numberOfBytes:long

the number of bytes written

exceptionOccurredback to summary
public default void exceptionOccurred(S socketMetric, SocketAddress remoteAddress, Throwable t)

Called when exceptions occur for a specific connection.

Parameters
socketMetric:S

the socket metric, null for UDP

remoteAddress:SocketAddress

the remote address of the connection or null if it's datagram/udp

t:Throwable

the exception that occurred