Class TestProcessor
java.lang.Object
ai.pipestream.module.pipelineprobe.TestProcessor
- All Implemented Interfaces:
ai.pipestream.module.runtime.work.ModuleProcessor<ai.pipestream.data.v1.PipeStream>
@ApplicationScoped
public class TestProcessor
extends Object
implements ai.pipestream.module.runtime.work.ModuleProcessor<ai.pipestream.data.v1.PipeStream>
Demand-pull processor for the module-testing-sidecar service. The engine
serves
PipeStream payloads via ModuleWorkService; this class
is the Mutiny-free analogue of the legacy inbound
PipeStepProcessorService.processData path.-
Nested Class Summary
Nested classes/interfaces inherited from interface ai.pipestream.module.runtime.work.ModuleProcessor
ai.pipestream.module.runtime.work.ModuleProcessor.PermanentFailure -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringGraph-builder key for rich observation taps. -
Constructor Summary
ConstructorsConstructorDescriptionCreates the demand-pull test processor; instances are managed by CDI. -
Method Summary
Modifier and TypeMethodDescriptionai.pipestream.data.v1.PipeStreamprocess(ai.pipestream.data.v1.PipeStream input) voidsetProcessingDelayMs(long delayMs) Overrides the per-document artificial processing delay and logs the new value.voidsetRandomFailureRate(double rate) Overrides the random failure rate and logs the new value.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ai.pipestream.module.runtime.work.ModuleProcessor
processToResult
-
Field Details
-
OBSERVE_RICH_PARAM
Graph-builder key for rich observation taps. Copied intoStreamMetadata.context_paramsby the engine before the module runs.- See Also:
-
-
Constructor Details
-
TestProcessor
public TestProcessor()Creates the demand-pull test processor; instances are managed by CDI.
-
-
Method Details
-
setProcessingDelayMs
public void setProcessingDelayMs(long delayMs) Overrides the per-document artificial processing delay and logs the new value.- Parameters:
delayMs- the delay in milliseconds to sleep on each processed document
-
setRandomFailureRate
public void setRandomFailureRate(double rate) Overrides the random failure rate and logs the new value.- Parameters:
rate- the probability (between0.0and1.0inclusive) that a document is failed with a simulated error- Throws:
IllegalArgumentException- ifrateis outside[0.0, 1.0]
-
process
public ai.pipestream.data.v1.PipeStream process(ai.pipestream.data.v1.PipeStream input) - Specified by:
processin interfaceai.pipestream.module.runtime.work.ModuleProcessor<ai.pipestream.data.v1.PipeStream>
-