protected class DummyVertxMetrics.DummyTCPMetrics extends Object implements TCPMetrics<Void>
Modifier | Constructor and Description |
---|---|
protected |
DummyTCPMetrics() |
Modifier and Type | Method and Description |
---|---|
void |
bytesRead(Void socketMetric,
SocketAddress remoteAddress,
long numberOfBytes)
Called when bytes have been read
|
void |
bytesWritten(Void socketMetric,
SocketAddress remoteAddress,
long numberOfBytes)
Called when bytes have been written
|
void |
close()
Used to close out the metrics, for example when an http server/client has been closed.
No specific thread and context can be expected when this method is called.
|
Void |
connected(SocketAddress remoteAddress)
Called when a client has connected, which is applicable for TCP connections.
|
void |
disconnected(Void socketMetric,
SocketAddress remoteAddress)
Called when a client has disconnected, which is applicable for TCP connections.
|
void |
exceptionOccurred(Void socketMetric,
SocketAddress remoteAddress,
Throwable t)
Called when exceptions occur for a specific connection.
|
boolean |
isEnabled()
Whether the metrics are enabled.
|
public Void connected(SocketAddress remoteAddress)
TCPMetrics
connected
in interface TCPMetrics<Void>
remoteAddress
- the remote address of the clientpublic void disconnected(Void socketMetric, SocketAddress remoteAddress)
TCPMetrics
disconnected
in interface TCPMetrics<Void>
socketMetric
- the socket metricremoteAddress
- the remote address of the clientpublic void bytesRead(Void socketMetric, SocketAddress remoteAddress, long numberOfBytes)
NetworkMetrics
bytesRead
in interface NetworkMetrics<Void>
socketMetric
- the socket metric, null for UDPremoteAddress
- the remote address which this socket received bytes fromnumberOfBytes
- the number of bytes readpublic void bytesWritten(Void socketMetric, SocketAddress remoteAddress, long numberOfBytes)
NetworkMetrics
bytesWritten
in interface NetworkMetrics<Void>
socketMetric
- the socket metric, null for UDPremoteAddress
- the remote address which bytes are being written tonumberOfBytes
- the number of bytes writtenpublic void exceptionOccurred(Void socketMetric, SocketAddress remoteAddress, Throwable t)
NetworkMetrics
exceptionOccurred
in interface NetworkMetrics<Void>
socketMetric
- the socket metric, null for UDPremoteAddress
- the remote address of the connection or null if it's datagram/udpt
- the exception that occurredpublic void close()
Metrics
Copyright © 2015. All Rights Reserved.