protected class DummyVertxMetrics.DummyHttpServerMetrics extends Object implements HttpServerMetrics<Void,Void,Void>
Modifier | Constructor and Description |
---|---|
protected |
DummyHttpServerMetrics() |
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,
ServerWebSocket serverWebSocket)
Called when a server web socket connects.
|
void |
disconnected(Void serverWebSocketMetric)
Called when the server 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,
HttpServerRequest request)
Called when an http server request begins
|
void |
responseEnd(Void requestMetric,
HttpServerResponse response)
Called when an http server response has ended.
|
public Void requestBegin(Void socketMetric, HttpServerRequest request)
HttpServerMetrics
requestBegin
in interface HttpServerMetrics<Void,Void,Void>
socketMetric
- the socket metricrequest
- the HttpServerRequest
public void responseEnd(Void requestMetric, HttpServerResponse response)
HttpServerMetrics
responseEnd
in interface HttpServerMetrics<Void,Void,Void>
requestMetric
- the request metricresponse
- the HttpServerResponse
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, ServerWebSocket serverWebSocket)
HttpServerMetrics
connected
in interface HttpServerMetrics<Void,Void,Void>
socketMetric
- the socket metricserverWebSocket
- the server web socketpublic void disconnected(Void serverWebSocketMetric)
HttpServerMetrics
disconnected
in interface HttpServerMetrics<Void,Void,Void>
serverWebSocketMetric
- the server web socket metricCopyright © 2015. All Rights Reserved.