Class SokletSimulator
Incomplete teardown throws SokletShutdownIncompleteException after a
successful simulation body, or suppresses it on the original body failure.
Its message summarizes component dispositions and residual activity; inspect
SokletLifecycleException.getShutdownResult() for the frozen typed
evidence. Outstanding work alone does not invent a Throwable cause.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceSokletSimulator.Simulation<E extends @NonNull Throwable>Simulation body with checked-exception transparency. -
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends @NonNull Throwable>
@NonNull ShutdownResultrun(@NonNull SimulatorConfig simulatorConfig, @NonNull SokletSimulator.Simulation<@NonNull E> simulation) Runs one prebuilt, single-use off-network simulation configuration.static <E extends @NonNull Throwable>
@NonNull ShutdownResultrun(@NonNull SokletConfig sokletConfig, @NonNull SokletSimulator.Simulation<@NonNull E> simulation) Runs an existing Soklet application configuration against a fresh, off-network simulator transport graph.
-
Method Details
-
run
public static <E extends @NonNull Throwable> @NonNull ShutdownResult run(@NonNull SokletConfig sokletConfig, @NonNull SokletSimulator.Simulation<@NonNull E> simulation) throws E Runs an existing Soklet application configuration against a fresh, off-network simulator transport graph.The source configuration supplies the application's settings and transport shape. Every source transport type remains present in the derived graph; use
SimulatorConfig.builder()when a test must omit one. The simulator call never starts, claims, reuses, or changes the source HTTP, SSE, or MCP instances, so each invocation is transport-isolated.Explicitly configured application and MCP collaborators are reused by identity. Derivation does not inspect or rebind dependency-injection providers or other objects that captured a source transport. Supply test-scoped collaborators through
SimulatorConfig.withSokletConfig(SokletConfig)when needed. A caller interrupt status left set by the simulation body is temporarily cleared while bounded teardown runs and is restored before this method returns or throws.- Type Parameters:
E- checked throwable type selected by the simulation- Parameters:
sokletConfig- source application configurationsimulation- simulation work- Returns:
- the exact immutable scope-shutdown result
- Throws:
E- if the simulation fails; a teardown failure is then suppressed on itSokletShutdownIncompleteException- if successful simulation execution is followed by shutdown that cannot be proven complete
-
run
public static <E extends @NonNull Throwable> @NonNull ShutdownResult run(@NonNull SimulatorConfig simulatorConfig, @NonNull SokletSimulator.Simulation<@NonNull E> simulation) throws E Runs one prebuilt, single-use off-network simulation configuration. A caller interrupt status left set by the simulation body is temporarily cleared while bounded teardown runs and is restored before this method returns or throws.- Type Parameters:
E- checked throwable type selected by the simulation- Parameters:
simulatorConfig- simulator configuration; it is claimed by this call before lifecycle work begins and cannot be reusedsimulation- simulation work- Returns:
- the exact immutable scope-shutdown result
- Throws:
E- if the simulation fails; a teardown failure is then suppressed on itSokletShutdownIncompleteException- if successful simulation execution is followed by shutdown that cannot be proven completeIllegalStateException- ifsimulatorConfigwas already claimed
-