Class ManagedJobFactory
java.lang.Object
org.j7m.middleware.application.distributed.ManagedJobFactory
- All Implemented Interfaces:
AutoCloseable, org.j7m.middleware.application.components.ManagedHostedResources.Factory, org.j7m.middleware.application.components.ManagedInvocationPolicy
public final class ManagedJobFactory
extends Object
implements org.j7m.middleware.application.components.ManagedHostedResources.Factory, org.j7m.middleware.application.components.ManagedInvocationPolicy, AutoCloseable
General POJO durable job host using actual owned calls and reactive native claim delivery.
Install this exact instance as both hosted factory and REPLAY policy. Native completion follows
USER settlement and inner transaction finalizers; checkpoint/progress are explicit safe points.
Bounded workers, reconnect timers and renewals do not turn cancellation into physical completion.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumActual local lifecycle, independent of a public stage's cancellation.static enumFixed redacted diagnostics; none contains input, exception text or credentials.static final recordImmutable local host observation.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
ConstructorsConstructorDescriptionManagedJobFactory(Map<String, ManagedJobProfile> profiles, int maximumWorkers, int maximumQueued) Creates a bounded host without scheduled definitions.ManagedJobFactory(Map<String, ManagedJobProfile> profiles, Map<String, ManagedScheduleProfile> triggers, int maximumWorkers, int maximumQueued) Creates explicit native job and durable trigger capabilities without starting work. -
Method Summary
Modifier and TypeMethodDescriptionSet<Class<? extends Annotation>> Returns actual finite job/hook capabilities.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) Binds one real activation component without admitting work until global commit.org.j7m.middleware.application.components.ManagedInvocationPolicy.Bindingbind(org.j7m.middleware.application.api.ManagedServiceContract contract, Class<?> implementation, Class<?> businessInterface) Installs only a genuine captured claim context and owned result finalizer.Selects producer metadata by the exact trusted profile, definition and version.voidclose()Closes worker resources only after all bound resources have actually drained and closed.org.j7m.middleware.application.components.ManagedInvocationPolicy.Phasephase()Places native replay/completion outside transaction commit and inside security/admission.Set<org.j7m.middleware.application.components.ManagedInvocationPolicy> Requires the same actual guard instance before component construction.statuses()Returns bounded local observations without application data.voidvalidate(org.j7m.middleware.application.api.ManagedHostedFeature feature, org.j7m.middleware.application.api.ManagedComponentDefinition<?> definition, org.j7m.middleware.application.components.ManagedHostedResources.Bundle bundle) Validates the complete finite plan, schema allowlist and selected policies before constructors.voidvalidate(org.j7m.middleware.application.api.ManagedServiceContract contract, Class<?> implementation, Class<?> businessInterface) Allows only the actual hosted contract for a job component, never an RPC alias.voidvalidateComponent(Class<?> component, boolean exported) Rejects job metadata without an actual hosted entry boundary.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, validateExposure, validateHosted, validateHostedExposure, validateHostedExposure
-
Constructor Details
-
ManagedJobFactory
public ManagedJobFactory(Map<String, ManagedJobProfile> profiles, int maximumWorkers, int maximumQueued) Creates a bounded host without scheduled definitions.- Parameters:
profiles- immutable named native job sources, at most64maximumWorkers- concurrent synchronous callback roots,1..16maximumQueued- bounded ready queue,1..64
-
ManagedJobFactory
public ManagedJobFactory(Map<String, ManagedJobProfile> profiles, Map<String, ManagedScheduleProfile> triggers, int maximumWorkers, int maximumQueued) Creates explicit native job and durable trigger capabilities without starting work.- Parameters:
profiles- immutable named job profiles, at most64triggers- immutable named durable trigger profiles, at most64maximumWorkers- concurrent synchronous roots,1..16maximumQueued- bounded ready queue,1..64- Throws:
IllegalArgumentException- for invalid names or capacityNullPointerException- for missing profiles
-
-
Method Details
-
annotationTypes
Returns actual finite job/hook capabilities.- Specified by:
annotationTypesin interfaceorg.j7m.middleware.application.components.ManagedHostedResources.Factory- Specified by:
annotationTypesin interfaceorg.j7m.middleware.application.components.ManagedInvocationPolicy- Returns:
- immutable marker allowlist
-
requiredPolicies
Requires the same actual guard instance before component construction.- Specified by:
requiredPoliciesin interfaceorg.j7m.middleware.application.components.ManagedHostedResources.Factory- Returns:
- this exact policy installation
-
phase
public org.j7m.middleware.application.components.ManagedInvocationPolicy.Phase phase()Places native replay/completion outside transaction commit and inside security/admission.- Specified by:
phasein interfaceorg.j7m.middleware.application.components.ManagedInvocationPolicy- Returns:
- REPLAY phase
-
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 the complete finite plan, schema allowlist and selected policies before constructors.- Specified by:
validatein interfaceorg.j7m.middleware.application.components.ManagedHostedResources.Factory- Parameters:
feature- generated job declarationdefinition- exact generated adapterbundle- verified artifact/configuration identity
-
validateComponent
Rejects job metadata without an actual hosted entry boundary.- Specified by:
validateComponentin interfaceorg.j7m.middleware.application.components.ManagedInvocationPolicy- Parameters:
component- declared finite componentexported- whether the host has actual service/callback exposure
-
validate
public void validate(org.j7m.middleware.application.api.ManagedServiceContract contract, Class<?> implementation, Class<?> businessInterface) Allows only the actual hosted contract for a job component, never an RPC alias.- Specified by:
validatein interfaceorg.j7m.middleware.application.components.ManagedInvocationPolicy- Parameters:
contract- full hosted identityimplementation- concrete componentbusinessInterface- finite host callback type
-
bind
public org.j7m.middleware.application.components.ManagedInvocationPolicy.Binding bind(org.j7m.middleware.application.api.ManagedServiceContract contract, Class<?> implementation, Class<?> businessInterface) Installs only a genuine captured claim context and owned result finalizer.- Specified by:
bindin interfaceorg.j7m.middleware.application.components.ManagedInvocationPolicy- Parameters:
contract- validated hosted contractimplementation- concrete componentbusinessInterface- finite generated host type- Returns:
- borrowed per-boundary policy state
-
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) Binds one real activation component without admitting work until global commit.- Specified by:
bindin interfaceorg.j7m.middleware.application.components.ManagedHostedResources.Factory- Parameters:
feature- validated featuredefinition- actual generated job adaptercomponent- activation-owned POJO, never closed by this factorybundle- verified immutable program identityinvoker- fixed-principal owned call handle- Returns:
- activation-owned lifecycle
-
client
Selects producer metadata by the exact trusted profile, definition and version.- Parameters:
policy- installed profile namedefinition- stable job definition identityversion- positive logical contract version- Returns:
- independently closeable borrowed-endpoint producer/query facade
- Throws:
IllegalArgumentException- if absent or ambiguous
-
statuses
Returns bounded local observations without application data.- Returns:
- at most64 immutable lifecycle observations
-
close
public void close()Closes worker resources only after all bound resources have actually drained and closed.- Specified by:
closein interfaceAutoCloseable- Throws:
IllegalStateException- if a binding still owns actual work
-