Interface AgentGroupFactory

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AgentGroupFactory
SPI for creating AgentGroup instances.

The default implementation is provided by the tnsai-coordination module. This factory is discovered through the Java service-provider mechanism at runtime, allowing tnsai-core to remain independent of concrete group implementations.

See Also:
  • Method Details

    • create

      AgentGroup create(String id, String name, String description, GroupPolicy policy)
      Creates a new AgentGroup instance.
      Parameters:
      id - group ID
      name - group name
      description - group description (nullable)
      policy - group policy
      Returns:
      new AgentGroup instance
    • discover

      static AgentGroupFactory discover()
      Discovers an AgentGroupFactory via ServiceLoader.
      Returns:
      discovered factory
      Throws:
      IllegalStateException - if no factory is found on the classpath