Class ManagedCallContext

java.lang.Object
org.j7m.middleware.cluster.ManagedCallContext

public final class ManagedCallContext extends Object
Handler-visible cooperative call budget for the actual hosted invocation. The handler may capture this immutable context for child work and must poll cancellation at safe boundaries. Cancellation means deadline expiry or interruption of the dispatch thread; it never rolls back a committed/external effect and never proves the handler has finished. There is no remote early cancellation operation in this version. This context grants no security or coordination authority.
  • Method Details

    • current

      public static ManagedCallContext current()
      Returns the actual current hosted call context, without creating an unbounded budget.
      Returns:
      current context, or null outside managed invocation
    • deadline

      public Instant deadline()
      Returns the caller's absolute deadline propagated over the authenticated transport.
      Returns:
      immutable caller deadline
    • cancellationRequested

      public boolean cancellationRequested()
      Reports cooperative cancellation without clearing the interruption flag.
      Returns:
      whether the caller budget expired or dispatch was interrupted