Interface ManagedHostedResources.Invoker
- All Known Implementing Classes:
ManagedHostedInvoker
- Enclosing class:
ManagedHostedResources
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Fixed-authority invocation handle retained only by a trusted bound factory.
It enters an exact generated callback on the calling bounded worker thread. The stage is
returned after root method return and completes only after policies and physical cleanup.
It must not be called on a scheduler, consensus apply thread or from application code.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanObserves the host's shared activation admission guard, without granting authority.default CompletionStage<Object> invoke(org.j7m.middleware.application.api.ManagedMethod method, Object[] arguments, org.j7m.middleware.api.InvocationOptions options) Invokes a declared callback using the host-bound worker principal and logical target.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.default 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.
-
Method Details
-
admissionOpen
default 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.- Returns:
- whether the owning host has committed admission for all hosted resources
-
invoke
default CompletionStage<Object> invoke(org.j7m.middleware.application.api.ManagedMethod method, Object[] arguments, org.j7m.middleware.api.InvocationOptions options) Invokes a declared callback using the host-bound worker principal and logical target.- Parameters:
method- exact callback identity in this featurearguments- ordered application dataoptions- correlation and budget, clamped by the trusted host maximum- Returns:
- host-owned completion after actual work and finalization
- Throws:
IllegalArgumentException- for an undeclared callback or invalid options
-
invokeDecoded
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.- Parameters:
method- exact generated callback identitydecoder- bounded argument decoder executing inside actual invocation contextoptions- correlation and finite remaining budget- Returns:
- host-owned completion after policies and physical cleanup
- Throws:
IllegalArgumentException- for an undeclared callback or invalid options
-
invokeDecoded
default 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.- Parameters:
method- exact callback identitydecoder- bounded decoder within the owned CALLoptions- finite original budgetinboundBytes- trusted nonnegative encoded input size- Returns:
- physical completion stage
- Throws:
UnsupportedOperationException- if this handle cannot enforce measured admission
-