Package dev.agenor.runtime.dialogue
Class DialogueCapability.Builder
java.lang.Object
dev.agenor.runtime.dialogue.DialogueCapability.Builder
- Enclosing class:
DialogueCapability
Builder for a
DialogueCapability with non-default collaborators.
Every collaborator has the same default the plain constructor uses, so only what actually differs needs to be set.
- Since:
- 0.26.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()commitmentTracker(CommitmentTracker tracker) protocolRegistry(ProtocolRegistry registry) sweepInterval(Duration sweepInterval)
-
Method Details
-
conversationManagerFactory
- Parameters:
factory- creates the conversation manager; defaultDefaultConversationManager::new(in-memory, node-local)- Returns:
- this builder
-
protocolRegistry
- Parameters:
registry- the protocols available to this agent, e.g. one carrying a customProtocol; default: the built-in request/query/contract-net- Returns:
- this builder
-
commitmentTracker
- Parameters:
tracker- records the commitments made in this agent's conversations; defaultDefaultCommitmentTracker- Returns:
- this builder
-
retention
- Parameters:
retention- how long terminated conversations and commitments are kept before being swept; default 5 minutes- Returns:
- this builder
-
sweepInterval
- Parameters:
sweepInterval- how often the retention sweep runs; default 1 minute. It also bounds how late an overdue commitment is marked violated- Returns:
- this builder
-
build
- Returns:
- the configured capability, already registered on the agent's lifecycle hooks when it supports them
-