Class MockWorkEngineResource
java.lang.Object
ai.pipestream.module.pipelineprobe.mockengine.MockWorkEngineResource
@Path("/mock-engine")
@Produces("application/json")
public class MockWorkEngineResource
extends Object
Control + observability for the
MockWorkEngineService. Start a run by
(re)loading the corpus to a unit count, then read the stats to assert the
module-under-test drained the queue.
POST /mock-engine/run?count=1000 # serve 1000 fresh units, reset stats GET /mock-engine/stats # served / acked / byStatus / byDisposition / acksPerSecond POST /mock-engine/reset # drain + clear stats
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreset()Drain the corpus and clear the stats.run(int count) (Re)load the corpus with a fresh budget and clear the stats, so the next module to dial in pullscountunits.stats()Returns the live run statistics together with the total number of units being served.
-
Constructor Details
-
MockWorkEngineResource
public MockWorkEngineResource()Creates the mock work engine control resource. Instances are managed by the JAX-RS runtime.
-
-
Method Details
-
run
@POST @Path("/run") public Map<String,Object> run(@QueryParam("count") @DefaultValue("-1") int count) (Re)load the corpus with a fresh budget and clear the stats, so the next module to dial in pullscountunits.- Parameters:
count- number of work units to serve (negative → configured default)- Returns:
- the cleared stats snapshot plus the total to serve
-
stats
-
reset
-