Class ConstraintGates
java.lang.Object
ai.badmonkey.agentspaces.spring.ConstraintGates
- All Implemented Interfaces:
AutoCloseable, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle
public final class ConstraintGates
extends Object
implements org.springframework.context.SmartLifecycle, AutoCloseable
Installs a
ConstraintGate in every group's binder when agentspaces.rules.gate is on
(ISSUE-Constraints FR-10, §9.4, §9.5): the group's constraints space is the configured one or one
opened here, every other configured space of the group is watched for the keys' events, and the node sets the
membership hint rules.gate=true for the group. A bound agent on such a peer has its claims and its
results judged by the published rules; a peer without the property gates nothing and advertises no hint.-
Field Summary
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsConstructorDescriptionConstraintGates(AgentSpaces spaces, AgentSpacesProperties properties, Authorizers authorizers, PeerNode node, PeerIdentity identity, InstantSource clock) -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.SmartLifecycle
isAutoStartup, stop
-
Constructor Details
-
ConstraintGates
public ConstraintGates(AgentSpaces spaces, AgentSpacesProperties properties, Authorizers authorizers, PeerNode node, PeerIdentity identity, InstantSource clock)
-
-
Method Details
-
start
public void start()- Specified by:
startin interfaceorg.springframework.context.Lifecycle
-
gate
The gate of a group, for the console panel and the tests. -
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-
getPhase
public int getPhase()- Specified by:
getPhasein interfaceorg.springframework.context.Phased- Specified by:
getPhasein interfaceorg.springframework.context.SmartLifecycle
-