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.
  • Constructor Details

  • Method Details

    • start

      public void start()
      Specified by:
      start in interface org.springframework.context.Lifecycle
    • gate

      public ConstraintGate gate(String groupName)
      The gate of a group, for the console panel and the tests.
    • stop

      public void stop()
      Specified by:
      stop in interface org.springframework.context.Lifecycle
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface org.springframework.context.Lifecycle
    • getPhase

      public int getPhase()
      Specified by:
      getPhase in interface org.springframework.context.Phased
      Specified by:
      getPhase in interface org.springframework.context.SmartLifecycle