AgentContext new ctor;

This commit is contained in:
extio-de
2025-06-23 12:37:16 +02:00
parent 3b07338f94
commit 8aee0acb15
2 changed files with 7 additions and 1 deletions

View File

@@ -4,7 +4,7 @@
<artifactId>lm-lib</artifactId>
<groupId>de.extio</groupId>
<name>lm-lib</name>
<version>1.5.0</version>
<version>1.5.1</version>
<properties>
<java.version>21</java.version>

View File

@@ -32,6 +32,12 @@ public final class AgentContext {
private volatile boolean skipNextCompletion;
public AgentContext(final Collection<? extends BaseAgent> agents) {
this.agents = agents.stream().collect(Collectors.toMap(BaseAgent::name, agent -> agent));
this.context = new ConcurrentHashMap<>();
this.requestStatistic = new AgentRequestStatistic();
}
public AgentContext(final Map<String, ? extends BaseAgent> agents) {
this.agents = agents;
this.context = new ConcurrentHashMap<>();