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

public Interface ClientMetrics<M, T, Req, Resp>

extends Metrics
Known Direct Implementers
io.vertx.core.metrics.impl.DummyVertxMetrics.DummyClientMetrics

The client metrics SPI that Vert.x will use to call when client events occur.

Author
Julien Viet

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
dequeueRequest(T taskMetric)

Called when a request for connection is satisfied.

public default T
enqueueRequest()

Called when a connection is requested.

public default M

Returns:

the request metric
requestBegin
(String
an arbitrary uri
uri
,
Req
the request object
request
)

Called when a client request begins.

public default void
requestEnd(M requestMetric)

Calls requestEnd(Object, long) with -1L

public default void
requestEnd(M
the request metric
requestMetric
,
long
the number of bytes written or -1 when it is not known
bytesWritten
)

Called when the client request ends.

public default void
requestReset(M
the request metric
requestMetric
)

Called when the client request couldn't complete successfully, for instance the connection was closed before the response was received.

public default void
responseBegin(M
the request metric
requestMetric
,
Resp
the response object
response
)

Called when the client response begins.

public default void
responseEnd(M requestMetric)

Calls responseEnd(Object, long) with -1L

public default void
responseEnd(M
the request metric
requestMetric
,
long
the number of bytes read or -1 when it is not known
bytesRead
)

Called when the client response has ended

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

Method Detail

dequeueRequestback to summary
public default void dequeueRequest(T taskMetric)

Called when a request for connection is satisfied.

enqueueRequestback to summary
public default T enqueueRequest()

Called when a connection is requested.

requestBeginback to summary
public default M requestBegin(String uri, Req request)

Called when a client request begins. Vert.x will invoke requestEnd when the request has ended or requestReset if the request/response has failed before.

The request uri is an arbitrary URI that depends on the client, e.g an HTTP request uri, a SQL query, etc...

Parameters
uri:String

an arbitrary uri

request:Req

the request object

Returns:M

the request metric

requestEndback to summary
public default void requestEnd(M requestMetric)

Calls requestEnd(Object, long) with -1L

requestEndback to summary
public default void requestEnd(M requestMetric, long bytesWritten)

Called when the client request ends.

Parameters
requestMetric:M

the request metric

bytesWritten:long

the number of bytes written or -1 when it is not known

requestResetback to summary
public default void requestReset(M requestMetric)

Called when the client request couldn't complete successfully, for instance the connection was closed before the response was received.

Parameters
requestMetric:M

the request metric

responseBeginback to summary
public default void responseBegin(M requestMetric, Resp response)

Called when the client response begins. Vert.x will invoke responseEnd when the response has ended or requestReset if the request/response has failed before.

Parameters
requestMetric:M

the request metric

response:Resp

the response object

responseEndback to summary
public default void responseEnd(M requestMetric)

Calls responseEnd(Object, long) with -1L

responseEndback to summary
public default void responseEnd(M requestMetric, long bytesRead)

Called when the client response has ended

Parameters
requestMetric:M

the request metric

bytesRead:long

the number of bytes read or -1 when it is not known