Package io.inugami.api.processors
Interface ConfigHandler<K,V>
-
- Type Parameters:
K- the key typeV- the value type
- All Superinterfaces:
Map<K,V>
public interface ConfigHandler<K,V> extends Map<K,V>
In Inugami, the ConfigHandler is the root principle for configuration management. All configuration in Inugami are sent to components with this object. The configuration in Inugami are not static, values or functions can be injected or invoked using specific tags. To inject properties, use mustache template ({{someValue}}). For functions, it's the same approach than **EL** expression (#{myFunction(param1, param2)})
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description VapplyProperties(V value)Stringgrab(String message, K key)Stringgrab(K key)Doublegrab(K key, double defaultValue)Integergrab(K key, int defaultValue)booleangrabBoolean(K key)booleangrabBoolean(K key, boolean defaultValue)DoublegrabDouble(K key)IntegergrabInt(K key)IntegergrabInt(K key, Integer defaultValue)<T> TgrabJson(K key, JsonUnmarshalling unmarshaller)<T> TgrabJson(K key, Object jsonObj, JsonUnmarshalling unmarshaller)<T> TgrabJson(K key, String json, JsonUnmarshalling unmarshaller)longgrabLong(String key, long defaultValue)StringgrabOrDefault(K key, String defaultValue)List<String>grabValues(String prefix)ConfigHandler<K,V>optionnal()-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
grabLong
long grabLong(String key, long defaultValue)
-
grabBoolean
boolean grabBoolean(K key)
-
grabBoolean
boolean grabBoolean(K key, boolean defaultValue)
-
grabJson
<T> T grabJson(K key, String json, JsonUnmarshalling unmarshaller)
-
grabJson
<T> T grabJson(K key, JsonUnmarshalling unmarshaller)
-
grabJson
<T> T grabJson(K key, Object jsonObj, JsonUnmarshalling unmarshaller)
-
optionnal
ConfigHandler<K,V> optionnal()
-
-