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

public Interface HttpClientMetrics<R, W, S, T>

extends TCPMetrics<S>
Known Direct Implementers
io.vertx.core.metrics.impl.DummyVertxMetrics.DummyHttpClientMetrics
Imports
io.vertx.core.http.WebSocket, io.vertx.core.net.SocketAddress, io.vertx.core.spi.observability.HttpRequest, .HttpResponse

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

The thread model for the http server metrics depends on the actual context thats started the server.

Event loop context

Unless specified otherwise, all the methods on this object including the methods inherited from the super interfaces are invoked with the thread of the http client and therefore are the same than the io.vertx.core.spi.metrics.VertxMetrics createMetrics method that created and returned this metrics object.

Worker context

Unless specified otherwise, all the methods on this object including the methods inherited from the super interfaces are invoked with a worker thread.
Author
Nick Scavelli

Method Summary

Modifier and TypeMethod and Description
public default W

Returns:

the web socket metric
connected
(WebSocket
the server web socket
webSocket
)

Called when a web socket connects.

public default ClientMetrics<R, T, HttpRequest, HttpResponse>

Returns:

the endpoint metric
createEndpointMetrics
(SocketAddress
the endpoint remote address
remoteAddress
,
int
the server max pool size
maxPoolSize
)

Provides metrics for a particular endpoint

public default void
disconnected(W
the web socket metric
webSocketMetric
)

Called when the web socket has disconnected.

public default void
endpointConnected(ClientMetrics<R, T, ?, ?>
the endpoint metric
endpointMetric
)

Called when a connection is made to a endpoint.

public default void
endpointDisconnected(ClientMetrics<R, T, ?, ?>
the endpoint metric
endpointMetric
)

Called when a connection to an endpoint is closed.

Inherited from io.vertx.core.spi.metrics.TCPMetrics:
connecteddisconnected

Method Detail

connectedback to summary
public default W connected(WebSocket webSocket)

Called when a web socket connects.

Parameters
webSocket:WebSocket

the server web socket

Returns:W

the web socket metric

createEndpointMetricsback to summary
public default ClientMetrics<R, T, HttpRequest, HttpResponse> createEndpointMetrics(SocketAddress remoteAddress, int maxPoolSize)

Provides metrics for a particular endpoint

Parameters
remoteAddress:SocketAddress

the endpoint remote address

maxPoolSize:int

the server max pool size

Returns:ClientMetrics<R, T, HttpRequest, HttpResponse>

the endpoint metric

disconnectedback to summary
public default void disconnected(W webSocketMetric)

Called when the web socket has disconnected.

Parameters
webSocketMetric:W

the web socket metric

endpointConnectedback to summary
public default void endpointConnected(ClientMetrics<R, T, ?, ?> endpointMetric)

Called when a connection is made to a endpoint.

Parameters
endpointMetric:ClientMetrics<R, T, ?, ?>

the endpoint metric

endpointDisconnectedback to summary
public default void endpointDisconnected(ClientMetrics<R, T, ?, ?> endpointMetric)

Called when a connection to an endpoint is closed.

Parameters
endpointMetric:ClientMetrics<R, T, ?, ?>

the endpoint metric