Class TransportTerminationSignal

java.lang.Object
com.soklet.TransportTerminationSignal

@ThreadSafe public final class TransportTerminationSignal extends Object
Framework-owned capability loaned to one attached transport member for recording its independent failure and affirmative termination proof. The transport may retain the signal after attach(...) returns, but must not share it with an unrelated transport member or lifecycle. Soklet owns the recorded state and all completion derived from it; the transport can only report observations through the methods below.

A failure or termination proof reported before the lifecycle owner's shutdown intent is independent premature termination, including before readiness. For a synchronous TransportRuntime.start(StartupContext) failure, throw from start and let the owner deliver rollback phases; report proof after their cleanup ends. Do not delay a separate worker's failure signal merely because startup is still running.

Author:
Mark Allen
  • Method Details

    • signalTerminated

      public void signalTerminated()
      Records affirmative proof after every activity owned by this member ends. Repeated calls are idempotent. This remains legal after signalTerminationFailure(Throwable) so a failure can later be paired with definitive termination proof.

      Returning from a shutdown method, closing admission, or merely requesting cancelation is not sufficient proof while member-owned work remains.

    • signalTerminationFailure

      Records the first failure without claiming termination proof. Repeated calls are safe and do not replace the first recorded failure; callers may subsequently invoke signalTerminated() when proof becomes true. Reporting a failure does not transfer resource ownership to Soklet and does not claim that member-owned activity has ended.
      Parameters:
      cause - exact failure cause