public class DataCollectorServiceClient extends java.lang.Object implements DataCollectorService
ERROR_QUEUE_LIMIT_REACHED| Constructor and Description |
|---|
DataCollectorServiceClient(DataCollectorService dcs) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Is needed for the proxy generation
|
void |
collect(java.lang.String requestId,
io.vertx.core.json.JsonObject feature,
io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)
This method is doing the same as
DataCollectorService.collectAndReceive(String, JsonObject, Handler), but will not send back
the result. |
void |
collectAndReceive(java.lang.String requestId,
io.vertx.core.json.JsonObject feature,
io.vertx.core.Handler<io.vertx.core.AsyncResult<CollectorJobResult>> resultHandler)
This method triggers a
CollectorJob and receives the CollectorJobResult in the passed result
handler. |
void |
getMetricsSnapshot(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.json.JsonObject>> resultHandler)
Returns a JsonObject which contains a current snapshot of the metrics.
|
public DataCollectorServiceClient(DataCollectorService dcs)
public void collectAndReceive(java.lang.String requestId,
io.vertx.core.json.JsonObject feature,
io.vertx.core.Handler<io.vertx.core.AsyncResult<CollectorJobResult>> resultHandler)
DataCollectorServiceCollectorJob and receives the CollectorJobResult in the passed result
handler. If the queue of the DataCollectorServiceVerticle is already full, the response will be a failed
AsyncResult with the message which is specified in DataCollectorService.ERROR_QUEUE_LIMIT_REACHED.collectAndReceive in interface DataCollectorServicerequestId - A request id to identify the collection request.feature - A JSON object to pass attributes and properties which are needed for the collection process.resultHandler - A handler to process the result.public void collect(java.lang.String requestId,
io.vertx.core.json.JsonObject feature,
io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)
DataCollectorServiceDataCollectorService.collectAndReceive(String, JsonObject, Handler), but will not send back
the result. It will just send back the information if the job succeeded or failed.collect in interface DataCollectorServicerequestId - A request id to identify the collection request.feature - A JSON object to pass attributes and properties which are needed for the collection process.resultHandler - A handler to process the result.public void getMetricsSnapshot(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.json.JsonObject>> resultHandler)
DataCollectorService
{
total: {
jobs: {
count: 123,
failed: 12,
succeeded: 108,
exception: 3
},
quality: {
complete: 90,
partial: 20,
....
},
errors: {
blocked: 90,
timeout: 20,
....
}
},
queue: {
maxSize: 30,
free: 12,
occupied: 18
}
}
getMetricsSnapshot in interface DataCollectorServiceresultHandler - A handler to process the metrics result.public void close()
DataCollectorServiceclose in interface DataCollectorService