protected class DummyVertxMetrics.DummyHttpClientMetrics extends Object implements HttpClientMetrics<Void,Void,Void>
Modifier | Constructor and Description |
---|---|
protected |
DummyHttpClientMetrics() |
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 |
connected(Void socketMetric,
WebSocket webSocket)
Called when a web socket connects.
|
void |
disconnected(Void webSocketMetric)
Called when the web socket has disconnected.
|
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.
|
Void |
requestBegin(Void socketMetric,
SocketAddress localAddress,
SocketAddress remoteAddress,
HttpClientRequest request)
Called when an http client request begins
|
void |
responseEnd(Void requestMetric,
HttpClientResponse response)
Called when an http client response has ended
|
public Void requestBegin(Void socketMetric, SocketAddress localAddress, SocketAddress remoteAddress, HttpClientRequest request)
HttpClientMetrics
requestBegin
in interface HttpClientMetrics<Void,Void,Void>
socketMetric
- the socket metriclocalAddress
- the local addressremoteAddress
- the remote addressrequest
- the HttpClientRequest
public void responseEnd(Void requestMetric, HttpClientResponse response)
HttpClientMetrics
responseEnd
in interface HttpClientMetrics<Void,Void,Void>
requestMetric
- the request metricresponse
- the HttpClientResponse
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
public boolean isEnabled()
Metrics
public Void connected(Void socketMetric, WebSocket webSocket)
HttpClientMetrics
connected
in interface HttpClientMetrics<Void,Void,Void>
socketMetric
- the socket metricwebSocket
- the server web socketpublic void disconnected(Void webSocketMetric)
HttpClientMetrics
disconnected
in interface HttpClientMetrics<Void,Void,Void>
webSocketMetric
- the web socket metricCopyright © 2015. All Rights Reserved.