Class ManagedHostedInvoker

java.lang.Object
org.j7m.middleware.application.components.ManagedHostedInvoker
All Implemented Interfaces:
ManagedHostedResources.Invoker

public final class ManagedHostedInvoker extends Object implements ManagedHostedResources.Invoker
Trusted fixed-authority bridge from one finite hosted feature to its owned invocation boundary. Callback values must already represent the validated policy chain and generated direct dispatch. The borrowed completion factory owns admission, CALL/context, child tracking and physical cleanup. Calls synchronously enter on the backend's bounded worker; no additional executor or timer exists. This handle is retained only by a trusted backend, never injected into an application component.
  • Constructor Details

    • ManagedHostedInvoker

      public ManagedHostedInvoker(Map<org.j7m.middleware.application.api.ManagedMethod, ManagedHostedInvoker.Callback> callbacks, org.j7m.middleware.transport.api.InvocationCompletionFactory completion, ManagedHostedResources.Entry profile, org.j7m.middleware.api.ObjectRef target)
      Binds a finite immutable callback allowlist to one host-owned logical boundary and authority.
      Parameters:
      callbacks - exact generated methods with already validated policy chains,1..16 entries
      completion - actual host admission and physical ownership factory
      profile - fixed local worker identity and finite maximum budget
      target - unpublished host-owned target carrying internal hosted-boundary metadata
      Throws:
      NullPointerException - for null input or callback
      IllegalArgumentException - for an empty/excessive allowlist or noninternal target
    • ManagedHostedInvoker

      public ManagedHostedInvoker(Map<org.j7m.middleware.application.api.ManagedMethod, ManagedHostedInvoker.Callback> callbacks, org.j7m.middleware.transport.api.InvocationCompletionFactory completion, ManagedHostedResources.Entry profile, org.j7m.middleware.api.ObjectRef target, BooleanSupplier admission)
      Binds callbacks to the actual shared activation guard rather than standalone host readiness.
      Parameters:
      callbacks - exact finite generated callback/policy plans
      completion - actual host admission and physical ownership factory
      profile - fixed local worker identity and finite budget
      target - unpublished host-owned logical target
      admission - shared host activation guard, observed by pure resource endpoints as well
      Throws:
      NullPointerException - for null input
      IllegalArgumentException - for invalid callback inventory or target
  • Method Details

    • admissionOpen

      public boolean admissionOpen()
      Observes the host's shared activation admission guard, without granting authority. Standalone trusted host handles default to ready; managed hosting supplies the actual activation guard. This handle is never installed or supplied by application metadata.
      Specified by:
      admissionOpen in interface ManagedHostedResources.Invoker
      Returns:
      whether the owning host has committed admission for all hosted resources
    • invokeDecoded

      public CompletionStage<Object> invokeDecoded(org.j7m.middleware.application.api.ManagedMethod method, Callable<Object[]> decoder, org.j7m.middleware.api.InvocationOptions options)
      Decodes application values inside the same owned CALL before invoking its callback. The decoder is a trusted host codec action, not an application factory registration.
      Specified by:
      invokeDecoded in interface ManagedHostedResources.Invoker
      Parameters:
      method - exact generated callback identity
      decoder - bounded argument decoder executing inside actual invocation context
      options - correlation and finite remaining budget
      Returns:
      host-owned completion after policies and physical cleanup
    • invokeDecoded

      public CompletionStage<Object> invokeDecoded(org.j7m.middleware.application.api.ManagedMethod method, Callable<Object[]> decoder, org.j7m.middleware.api.InvocationOptions options, int inboundBytes)
      Supplies the actual bounded encoded input size from a trusted source adapter. The count is local host state, never an assertion taken from invocation metadata. The owning application applies its payload limit before running this decoder or handler.
      Specified by:
      invokeDecoded in interface ManagedHostedResources.Invoker
      Parameters:
      method - exact callback identity
      decoder - bounded decoder within the owned CALL
      options - finite original budget
      inboundBytes - trusted nonnegative encoded input size
      Returns:
      physical completion stage