Class ManagedQueueConsumerFactory
java.lang.Object
org.j7m.middleware.application.distributed.ManagedQueueConsumerFactory
- All Implemented Interfaces:
AutoCloseable, org.j7m.middleware.application.components.ManagedHostedResources.Factory, org.j7m.middleware.application.components.ManagedInvocationPolicy
public final class ManagedQueueConsumerFactory
extends Object
implements org.j7m.middleware.application.components.ManagedHostedResources.Factory, org.j7m.middleware.application.components.ManagedInvocationPolicy, AutoCloseable
Trusted reactive POJO consumer/DLQ lifecycle and its mandatory REPLAY policy. Install this same
instance as both hosted factory and invocation policy. SECURITY runs before every claim/replay.
Complete server-granted payloads consume bounded credit; no idle client claim polling occurs.
Native ACK follows physical success; external UNKNOWN never automatically reenters the body.
DLQ observers never ACK/remove/redrive retained poison records. Backends remain borrowed.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumActual lifecycle state, including physical drain rather than logical reply only.static enumSafe fixed reason categories, without application exception or payload text.static final recordBounded aggregate host diagnostics.Nested classes/interfaces inherited from interface org.j7m.middleware.application.components.ManagedInvocationPolicy
org.j7m.middleware.application.components.ManagedInvocationPolicy.Binding, org.j7m.middleware.application.components.ManagedInvocationPolicy.Proceed -
Constructor Summary
ConstructorsConstructorDescriptionManagedQueueConsumerFactory(Map<String, QueueConsumerProfile> profiles, int maximumWorkers) Creates a finite trusted worker host without opening sessions. -
Method Summary
Modifier and TypeMethodDescriptionSet<Class<? extends Annotation>> Declares only the two queue callback capabilities this adapter implements.org.j7m.middleware.application.components.ManagedHostedResources.Bindingbind(org.j7m.middleware.application.api.ManagedHostedFeature feature, org.j7m.middleware.application.api.ManagedComponentDefinition<?> definition, Object component, org.j7m.middleware.application.components.ManagedHostedResources.Bundle bundle, org.j7m.middleware.application.components.ManagedHostedResources.Invoker invoker) Creates a prepared lifecycle using only the actual trusted Invoker for application work.org.j7m.middleware.application.components.ManagedInvocationPolicy.Bindingbind(org.j7m.middleware.application.api.ManagedServiceContract contract, Class<?> implementation, Class<?> businessInterface) Binds the actual trusted per-invocation guard; no session is started by this method.voidclose()Closes shared host executors only after all actual application bindings were drained/released.org.j7m.middleware.application.components.ManagedInvocationPolicy.Phasephase()Selects durable replay inside security and outside participating transactions.Set<org.j7m.middleware.application.components.ManagedInvocationPolicy> Requires actual installation of this exact host guard, not an application capability marker.Reads safe local status without queue queries or message labels.Reads one exact tenant/queue-scoped logical handler status without network I/O.voidvalidate(org.j7m.middleware.application.api.ManagedHostedFeature feature, org.j7m.middleware.application.api.ManagedComponentDefinition<?> definition, org.j7m.middleware.application.components.ManagedHostedResources.Bundle bundle) Validates a finite generated callback before constructors or native work.voidvalidate(org.j7m.middleware.application.api.ManagedServiceContract contract, Class<?> implementation, Class<?> businessInterface) Rejects queue markers outside an actual generated hosted callback.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.j7m.middleware.application.components.ManagedHostedResources.Factory
backendKindsMethods inherited from interface org.j7m.middleware.application.components.ManagedInvocationPolicy
bindHosted, validateComponent, validateExposure, validateHosted, validateHostedExposure, validateHostedExposure
-
Constructor Details
-
ManagedQueueConsumerFactory
Creates a finite trusted worker host without opening sessions.- Parameters:
profiles- at most64 named queue profilesmaximumWorkers- simultaneous physical callbacks, 1..16- Throws:
IllegalArgumentException- for invalid registry/capacity
-
-
Method Details
-
requiredPolicies
Requires actual installation of this exact host guard, not an application capability marker.- Specified by:
requiredPoliciesin interfaceorg.j7m.middleware.application.components.ManagedHostedResources.Factory- Returns:
- identity-bound mandatory invocation policy
-
phase
public org.j7m.middleware.application.components.ManagedInvocationPolicy.Phase phase()Selects durable replay inside security and outside participating transactions.- Specified by:
phasein interfaceorg.j7m.middleware.application.components.ManagedInvocationPolicy- Returns:
- fixed REPLAY phase
-
annotationTypes
Declares only the two queue callback capabilities this adapter implements.- Specified by:
annotationTypesin interfaceorg.j7m.middleware.application.components.ManagedHostedResources.Factory- Specified by:
annotationTypesin interfaceorg.j7m.middleware.application.components.ManagedInvocationPolicy- Returns:
- immutable exact marker set
-
validate
public void validate(org.j7m.middleware.application.api.ManagedHostedFeature feature, org.j7m.middleware.application.api.ManagedComponentDefinition<?> definition, org.j7m.middleware.application.components.ManagedHostedResources.Bundle bundle) Validates a finite generated callback before constructors or native work.- Specified by:
validatein interfaceorg.j7m.middleware.application.components.ManagedHostedResources.Factory- Parameters:
feature- exact hosted featuredefinition- generated component planbundle- verified immutable bundle context- Throws:
IllegalArgumentException- for unsupported callback, queue, profile or descriptor mismatch
-
validate
public void validate(org.j7m.middleware.application.api.ManagedServiceContract contract, Class<?> implementation, Class<?> businessInterface) Rejects queue markers outside an actual generated hosted callback.- Specified by:
validatein interfaceorg.j7m.middleware.application.components.ManagedInvocationPolicy- Parameters:
contract- complete method identityimplementation- actual concrete componentbusinessInterface- generated hosted class or ordinary business interface- Throws:
IllegalArgumentException- for exporting callback metadata as ordinary RPC
-
bind
public org.j7m.middleware.application.components.ManagedInvocationPolicy.Binding bind(org.j7m.middleware.application.api.ManagedServiceContract contract, Class<?> implementation, Class<?> businessInterface) Binds the actual trusted per-invocation guard; no session is started by this method.- Specified by:
bindin interfaceorg.j7m.middleware.application.components.ManagedInvocationPolicy- Parameters:
contract- complete hosted or RPC identityimplementation- concrete componentbusinessInterface- verified business surface- Returns:
- owned revocable replay guard
-
bind
public org.j7m.middleware.application.components.ManagedHostedResources.Binding bind(org.j7m.middleware.application.api.ManagedHostedFeature feature, org.j7m.middleware.application.api.ManagedComponentDefinition<?> definition, Object component, org.j7m.middleware.application.components.ManagedHostedResources.Bundle bundle, org.j7m.middleware.application.components.ManagedHostedResources.Invoker invoker) Creates a prepared lifecycle using only the actual trusted Invoker for application work.- Specified by:
bindin interfaceorg.j7m.middleware.application.components.ManagedHostedResources.Factory- Parameters:
feature- validated finite descriptordefinition- generated componentcomponent- activation-owned instance, never closed by this factorybundle- verified immutable bundleinvoker- actual host policy and physical completion boundary- Returns:
- owned lifecycle; start/commitAdmission control external delivery
-
status
Reads safe local status without queue queries or message labels.- Parameters:
namespace- exact host logical namespacehandler- stable feature identity- Returns:
- immutable status
- Throws:
IllegalArgumentException- if unbound
-
status
public ManagedQueueConsumerFactory.Status status(String namespace, String tenant, String queue, String handler) Reads one exact tenant/queue-scoped logical handler status without network I/O.- Parameters:
namespace- host logical namespacetenant- exact source tenantqueue- exact source queuehandler- stable feature identity- Returns:
- safe local status
- Throws:
IllegalArgumentException- for an unknown or ambiguous kind binding
-
close
public void close()Closes shared host executors only after all actual application bindings were drained/released.- Specified by:
closein interfaceAutoCloseable- Throws:
IllegalStateException- if any binding remains owned
-