public class DataCollectorServiceVertxEBProxy extends java.lang.Object implements DataCollectorService
ERROR_QUEUE_LIMIT_REACHED
Constructor and Description |
---|
DataCollectorServiceVertxEBProxy(io.vertx.core.Vertx vertx,
java.lang.String address) |
DataCollectorServiceVertxEBProxy(io.vertx.core.Vertx vertx,
java.lang.String address,
io.vertx.core.eventbus.DeliveryOptions options) |
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 DataCollectorServiceVertxEBProxy(io.vertx.core.Vertx vertx, java.lang.String address)
public DataCollectorServiceVertxEBProxy(io.vertx.core.Vertx vertx, java.lang.String address, io.vertx.core.eventbus.DeliveryOptions options)
public void collectAndReceive(java.lang.String requestId, io.vertx.core.json.JsonObject feature, io.vertx.core.Handler<io.vertx.core.AsyncResult<CollectorJobResult>> resultHandler)
DataCollectorService
CollectorJob
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 DataCollectorService
requestId
- 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)
DataCollectorService
DataCollectorService.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 DataCollectorService
requestId
- 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 DataCollectorService
resultHandler
- A handler to process the metrics result.public void close()
DataCollectorService
close
in interface DataCollectorService