Class Invocation.ResultObservation

java.lang.Object
io.fluxzero.sdk.tracking.handling.Invocation.ResultObservation
Enclosing class:
Invocation

public static final class Invocation.ResultObservation extends Object
Tracking's invocation-local ownership of a deferred result. Installing an observation does not change ordinary handler results. Only explicitly attached deferred results replace the handler's immediate placeholder result.
  • Constructor Details

    • ResultObservation

      public ResultObservation(DeserializingMessage message)
      Creates an observation for exactly the message being handled, excluding nested local messages.
  • Method Details

    • observesDeferredResult

      public boolean observesDeferredResult()
      Whether this invocation has transferred a deferred result to tracking.
    • invoke

      public Object invoke(Callable<Object> action) throws Exception
      Invokes a handler inside an existing Invocation and exposes its deferred result, if any.
      Throws:
      Exception
    • retry

      public Object retry(io.fluxzero.common.handling.HandlerDescriptor handler, Callable<Object> action)
      Retries only this handler, releasing and awaiting its deferred commit before reporting retry success.
    • complete

      public Object complete(Object result)
      Settles batch ownership after tracking's error handler and any asynchronous recovery have finished.
    • fail

      public void fail(Throwable failure)
      Keeps an unhandled error exceptional for batch recovery.