io.vertx.up.uca.web.origin.AgentInquirer Maven / Gradle / Ivy
package io.vertx.up.uca.web.origin;
import io.vertx.up.annotations.Agent;
import io.vertx.up.eon.em.ServerType;
import io.vertx.up.util.Ut;
import io.vertx.up.runtime.ZeroHelper;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentMap;
import java.util.stream.Collectors;
/**
* This component is for @Agent annotated class
*/
public class AgentInquirer implements
Inquirer>>> {
@Override
public ConcurrentMap>> scan(final Set> classes) {
final Set> agents =
classes.stream()
.filter((item) -> item.isAnnotationPresent(Agent.class))
.collect(Collectors.toSet());
return Ut.elementGroup(agents, ZeroHelper::getAgentKey,
(item) -> item);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy