Module agentforge4j.runtime
Package com.agentforge4j.runtime.tool
Class InMemoryIntegrationRepository
java.lang.Object
com.agentforge4j.runtime.tool.InMemoryIntegrationRepository
- All Implemented Interfaces:
IntegrationRepository,MutableIntegrationRepository
public final class InMemoryIntegrationRepository
extends Object
implements MutableIntegrationRepository
In-memory
MutableIntegrationRepository (OSS default). Integrations are keyed by id and
mutated administratively; the OSS active-toggle is an edit-then-reload, so writes are direct
upserts rather than snapshot replacement. Uniqueness across integrations (for example a
capability exposed by two of them) is enforced downstream by the resolver, not here — this store
allows an id to be overwritten so a reload can replace a prior definition idempotently.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns every active integration.Looks up an integration by id.voidRemoves an integration.voidsave(IntegrationDefinition definition) Adds or replaces an integration.voidActivates or deactivates an integration.
-
Constructor Details
-
InMemoryIntegrationRepository
public InMemoryIntegrationRepository()
-
-
Method Details
-
findActive
Description copied from interface:IntegrationRepositoryReturns every active integration.- Specified by:
findActivein interfaceIntegrationRepository- Returns:
- the active integrations; never
null
-
findById
Description copied from interface:IntegrationRepositoryLooks up an integration by id.- Specified by:
findByIdin interfaceIntegrationRepository- Parameters:
id- integration id- Returns:
- the integration with this id, or
nullif none is registered
-
save
Description copied from interface:MutableIntegrationRepositoryAdds or replaces an integration.- Specified by:
savein interfaceMutableIntegrationRepository- Parameters:
definition- the integration to store
-
setActive
Description copied from interface:MutableIntegrationRepositoryActivates or deactivates an integration.- Specified by:
setActivein interfaceMutableIntegrationRepository- Parameters:
id- integration idactive- new active state
-
remove
Description copied from interface:MutableIntegrationRepositoryRemoves an integration.- Specified by:
removein interfaceMutableIntegrationRepository- Parameters:
id- integration id
-