io.vertx.up.uca.web.limit.ApiFactor Maven / Gradle / Ivy
package io.vertx.up.uca.web.limit;
import io.vertx.up.eon.Plugins;
import io.vertx.up.eon.em.ServerType;
import io.vertx.up.util.Ut;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
/**
* This factor could begin following:
* 1. Http Api Gateway
* 2. Rx/Http mode shared.
*/
public class ApiFactor extends AbstractFactor {
private static final Set> AGENT_SET = new HashSet<>();
private static final ConcurrentMap> INTERNALS = new ConcurrentHashMap<>();
static {
Ut.clazzIf(Plugins.Default.AGENT_API, clazz -> {
/*
* Plugin In
*/
AGENT_SET.add(clazz);
INTERNALS.put(ServerType.IPC, clazz);
});
}
@Override
public Class>[] defaults() {
return AGENT_SET.toArray(new Class>[]{});
}
@Override
public ConcurrentMap> internals() {
return INTERNALS;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy