2022-02-06 17:19:05 +01:00
|
|
|
package love.distributedrebirth.bassboonyd.jmx;
|
|
|
|
|
|
2022-10-14 01:35:53 +02:00
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
2022-10-17 16:25:23 +02:00
|
|
|
import love.distributedrebirth.bassboonyd.BãßBȍőnPhaseBarrierʸᴰ;
|
2022-02-06 17:19:05 +01:00
|
|
|
import love.distributedrebirth.bassboonyd.DefaultEnumBaseʸᴰ;
|
2022-10-17 16:42:12 +02:00
|
|
|
import love.distributedrebirth.bassboonyd.clazz.BãßBȍőnAnnotation注;
|
|
|
|
|
import love.distributedrebirth.bassboonyd.clazz.BãßBȍőnAuthor注;
|
|
|
|
|
import love.distributedrebirth.bassboonyd.clazz.BãßBȍőnInfo注;
|
2022-10-17 20:19:47 +02:00
|
|
|
import love.distributedrebirth.bassboonyd.coffin.BãßBȍőnCoffin;
|
|
|
|
|
import love.distributedrebirth.bassboonyd.coffin.BãßBȍőnCoffinNail;
|
2022-10-17 16:25:23 +02:00
|
|
|
import love.distributedrebirth.bassboonyd.sinit.BãßBȍőnꝐŕḯṿª₮ḕ;
|
|
|
|
|
import love.distributedrebirth.bassboonyd.sinit.BãßBȍőnꝐŕḯṿª₮ḕInit注;
|
2022-10-17 20:33:54 +02:00
|
|
|
import love.distributedrebirth.bassboonyd.spider.BãßBȍőnSpiderEgg注;
|
2022-02-06 17:19:05 +01:00
|
|
|
|
2022-10-15 02:34:58 +02:00
|
|
|
@BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
2022-10-17 16:42:12 +02:00
|
|
|
@BãßBȍőnAnnotation注(required = {BãßBȍőnInfo注.class})
|
2022-10-17 19:05:12 +02:00
|
|
|
public interface DefaultEnumBaseᴶᴹˣ<T,K extends BãßBȍőnCoffinNail> extends DefaultEnumBaseʸᴰ<T,K> {
|
2022-10-14 01:35:53 +02:00
|
|
|
|
2022-10-17 19:37:19 +02:00
|
|
|
public static final class Ꝑŕḯṿª₮ḕ implements BãßBȍőnꝐŕḯṿª₮ḕ {
|
2022-10-18 01:14:47 +02:00
|
|
|
protected static final String STR_NAME = "name";
|
|
|
|
|
protected static final String STR_TYPE = "type";
|
|
|
|
|
protected static final String STR_DOT = ".";
|
|
|
|
|
protected static final String STR_COLON = ":";
|
|
|
|
|
protected static final String STR_IS = "=";
|
|
|
|
|
protected static final String STR_COMMA = ",";
|
2022-10-14 01:35:53 +02:00
|
|
|
private static final String GHOST_KEY_JMX = "JMX";
|
2022-10-15 02:34:58 +02:00
|
|
|
|
2022-10-17 19:37:19 +02:00
|
|
|
private Ꝑŕḯṿª₮ḕ() {
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-17 17:26:46 +02:00
|
|
|
@BãßBȍőnꝐŕḯṿª₮ḕInit注(dependencies = {BãßBȍőnPhaseBarrierʸᴰ.βrahmanBoonBereshit.class})
|
2022-10-15 14:18:09 +02:00
|
|
|
private static void init(DefaultEnumBaseᴶᴹˣ<?,?> boon) {
|
|
|
|
|
boon.toBBC().UNHOLY(Ꝑŕḯṿª₮ḕ.class).PUT_GHOST(Ꝑŕḯṿª₮ḕ.GHOST_KEY_JMX, new HashMap<>());
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-15 14:12:04 +02:00
|
|
|
private static <X> X buildJmxGhost(DefaultEnumBaseᴶᴹˣ<?,?> boon, String name, X result) {
|
|
|
|
|
boon.toBBC().UNHOLY(Ꝑŕḯṿª₮ḕ.class).GHOST_MAP_OBJ(Ꝑŕḯṿª₮ḕ.GHOST_KEY_JMX).put(name, result);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-15 02:34:58 +02:00
|
|
|
@BãßBȍőnSpiderEgg注()
|
|
|
|
|
private static CounterGuageᴶᴹˣ buildGuageCounter(DefaultEnumBaseᴶᴹˣ<?,?> boon, String name, String description) {
|
2022-10-15 14:12:04 +02:00
|
|
|
return buildJmxGhost(boon, name, new CounterGuageᴶᴹˣ(name, description));
|
2022-10-15 02:34:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@BãßBȍőnSpiderEgg注()
|
|
|
|
|
private static AttributeStringᴶᴹˣ buildStringAttribute(DefaultEnumBaseᴶᴹˣ<?,?> boon, String name, String description) {
|
2022-10-15 14:12:04 +02:00
|
|
|
return buildJmxGhost(boon, name, new AttributeStringᴶᴹˣ(name, description));
|
2022-10-15 02:34:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@BãßBȍőnSpiderEgg注()
|
|
|
|
|
private static AttributeBooleanᴶᴹˣ buildBooleanAttribute(DefaultEnumBaseᴶᴹˣ<?,?> boon, String name, String description) {
|
2022-10-15 14:12:04 +02:00
|
|
|
return buildJmxGhost(boon, name, new AttributeBooleanᴶᴹˣ(name, description));
|
2022-10-15 02:34:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@BãßBȍőnSpiderEgg注()
|
|
|
|
|
private static AttributeIntegerᴶᴹˣ buildIntegerAttribute(DefaultEnumBaseᴶᴹˣ<?,?> boon, String name, String description) {
|
2022-10-15 14:12:04 +02:00
|
|
|
return buildJmxGhost(boon, name, new AttributeIntegerᴶᴹˣ(name, description));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@BãßBȍőnSpiderEgg注()
|
|
|
|
|
private static AttributeLongᴶᴹˣ buildLongAttribute(DefaultEnumBaseᴶᴹˣ<?,?> boon, String name, String description) {
|
|
|
|
|
return buildJmxGhost(boon, name, new AttributeLongᴶᴹˣ(name, description));
|
2022-10-15 02:34:58 +02:00
|
|
|
}
|
2022-10-14 01:35:53 +02:00
|
|
|
}
|
2022-02-06 17:19:05 +01:00
|
|
|
|
2022-10-17 19:05:12 +02:00
|
|
|
public static Map<String, Object> jmxGhosts(BãßBȍőnCoffin<?> BBC) {
|
2022-10-15 14:18:09 +02:00
|
|
|
return BBC.UNHOLY(Ꝑŕḯṿª₮ḕ.class).GHOST_MAP_OBJ(Ꝑŕḯṿª₮ḕ.GHOST_KEY_JMX);
|
2022-10-14 01:35:53 +02:00
|
|
|
}
|
2022-02-06 17:19:05 +01:00
|
|
|
}
|