diff --git a/pom.xml b/pom.xml index c5b6003..5838cb3 100755 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ lm-lib de.extio lm-lib - 1.5.0 + 1.5.1 21 diff --git a/src/main/java/de/extio/lmlib/agent/AgentContext.java b/src/main/java/de/extio/lmlib/agent/AgentContext.java index 5eb0a07..3aa8392 100755 --- a/src/main/java/de/extio/lmlib/agent/AgentContext.java +++ b/src/main/java/de/extio/lmlib/agent/AgentContext.java @@ -32,6 +32,12 @@ public final class AgentContext { private volatile boolean skipNextCompletion; + public AgentContext(final Collection agents) { + this.agents = agents.stream().collect(Collectors.toMap(BaseAgent::name, agent -> agent)); + this.context = new ConcurrentHashMap<>(); + this.requestStatistic = new AgentRequestStatistic(); + } + public AgentContext(final Map agents) { this.agents = agents; this.context = new ConcurrentHashMap<>();