Class ModuleTestInvoker
java.lang.Object
ai.pipestream.module.pipelineprobe.moduletest.ModuleTestInvoker
Forwards a serialized
PipeStream to a module's dev test door
(POST /module-runtime/v1/process-once) and returns the door's raw
JSON outcome. A dumb byte-forwarder: it shapes nothing — the caller supplies
a correctly-shaped payload — and it resolves the target from
ModuleTestConfig (static config), never runtime discovery.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe door's HTTP status plus its raw response body (JSON on success). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPOSTpayloadto<configured baseUrl>/module-runtime/v1/process-once.Proxy to the module's ops ramp surface (/module-runtime/v1/ramp):body == null→ GET (current pool state), otherwise POST it (JSON{"ceiling": N}).
-
Constructor Details
-
ModuleTestInvoker
public ModuleTestInvoker()Creates the module test invoker. Instances are managed by CDI.
-
-
Method Details
-
invoke
POSTpayloadto<configured baseUrl>/module-runtime/v1/process-once.- Parameters:
moduleName- configured module key (seeModuleTestConfig.targets())payload- a serializedPipeStream(the module's payload type)- Returns:
- the door's status + body
- Throws:
IllegalArgumentException- if the module has no configured targetIllegalStateException- if the door is unreachable
-
ramp
Proxy to the module's ops ramp surface (/module-runtime/v1/ramp):body == null→ GET (current pool state), otherwise POST it (JSON{"ceiling": N}). Same target resolution as the door.- Parameters:
moduleName- configured module key (seeModuleTestConfig.targets())jsonBody- the JSON body to POST, ornullto issue a GET for current state- Returns:
- the ramp endpoint's status + body
- Throws:
IllegalArgumentException- if the module has no configured targetIllegalStateException- if the ramp endpoint is unreachable
-