Package io.vertx.core.spi.metrics
Interface HttpServerMetrics<R,W,S>
- 
- All Superinterfaces:
- Metrics,- NetworkMetrics<S>,- TCPMetrics<S>
 
 public interface HttpServerMetrics<R,W,S> extends TCPMetrics<S> The http server metrics SPI that Vert.x will use to call when each http server event occurs. The thread model for the http server metrics depends on the actual context thats started the server.Event loop contextUnless specified otherwise, all the methods on this object including the methods inherited from the super interfaces are invoked with the thread of the http server and therefore are the same than theVertxMetricscreateMetricsmethod that created and returned this metrics object.Worker contextUnless 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
 
- 
- 
Field Summary- 
Fields inherited from interface io.vertx.core.spi.metrics.MetricsMETRICS_ENABLED
 
- 
 - 
Method SummaryAll Methods Instance Methods Default Methods Modifier and Type Method Description default Wconnected(S socketMetric, R requestMetric, ServerWebSocket serverWebSocket)Called when a server web socket connects.default voiddisconnected(W serverWebSocketMetric)Called when the server web socket has disconnected.default RrequestBegin(S socketMetric, HttpRequest request)Called when an http server request begins.default voidrequestEnd(R requestMetric, HttpRequest request, long bytesRead)Called when an http server request has ended.default voidrequestReset(R requestMetric)Called when the http server request couldn't complete successfully, for instance the connection was closed before the response was sent.default voidrequestRouted(R requestMetric, String route)Called when a routing layer indicates a request has been routed.default voidresponseBegin(R requestMetric, HttpResponse response)Called when an http server response begins.default voidresponseEnd(R requestMetric, HttpResponse response, long bytesWritten)Called when an http server response has ended.default RresponsePushed(S socketMetric, HttpMethod method, String uri, HttpResponse response)Called when an http server response is pushed.- 
Methods inherited from interface io.vertx.core.spi.metrics.NetworkMetricsbytesRead, bytesWritten, exceptionOccurred
 - 
Methods inherited from interface io.vertx.core.spi.metrics.TCPMetricsconnected, disconnected
 
- 
 
- 
- 
- 
Method Detail- 
requestBegindefault R requestBegin(S socketMetric, HttpRequest request) Called when an http server request begins. Vert.x will invokeresponseEnd(R, io.vertx.core.spi.observability.HttpResponse, long)when the response has ended orrequestReset(R)if the request/response has failed before.- Parameters:
- socketMetric- the socket metric
- request- the http server reuqest
- Returns:
- the request metric
 
 - 
requestEnddefault void requestEnd(R requestMetric, HttpRequest request, long bytesRead) Called when an http server request has ended.- Parameters:
- requestMetric- the request metric
- request- the same- HttpRequestprovided in the initial response callback
- bytesRead- the total number of bytes read
 
 - 
requestResetdefault void requestReset(R requestMetric) Called when the http server request couldn't complete successfully, for instance the connection was closed before the response was sent.- Parameters:
- requestMetric- the request metric
 
 - 
responseBegindefault void responseBegin(R requestMetric, HttpResponse response) Called when an http server response begins.- Parameters:
- requestMetric- the request metric
- response- the http server request
 
 - 
responsePusheddefault R responsePushed(S socketMetric, HttpMethod method, String uri, HttpResponse response) Called when an http server response is pushed.- Parameters:
- socketMetric- the socket metric
- method- the pushed response method
- uri- the pushed response uri
- response- the http server response @return the request metric
 
 - 
responseEnddefault void responseEnd(R requestMetric, HttpResponse response, long bytesWritten) Called when an http server response has ended.- Parameters:
- requestMetric- the request metric
- response- the same- HttpResponseprovided in the initial response callback
- bytesWritten- the total number of bytes written
 
 - 
connecteddefault W connected(S socketMetric, R requestMetric, ServerWebSocket serverWebSocket) Called when a server web socket connects.- Parameters:
- socketMetric- the socket metric
- requestMetric- the request metric
- serverWebSocket- the server web socket
- Returns:
- the server web socket metric
 
 - 
disconnecteddefault void disconnected(W serverWebSocketMetric) Called when the server web socket has disconnected.- Parameters:
- serverWebSocketMetric- the server web socket metric
 
 
- 
 
-