Package org.webappos.status
Interface IStatus
-
public interface IStatusAn interface for specifying status values. Status info is referenced by a string key (usually, a fully qualified name of some property). The value of each key can be updated several times at runtime to reflect the updated status.- Author:
- Sergejs Kozlovics
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.google.gson.JsonElementgetValue(java.lang.String key)Gets the value of the given status key.booleansetValue(java.lang.String key, java.lang.Object value)Sets the given status value.
-
-
-
Method Detail
-
getValue
com.google.gson.JsonElement getValue(java.lang.String key)
Gets the value of the given status key.- Parameters:
key- a key specified as the path (e.g., "server/pid")- Returns:
- a JSON element (the final element or a branch); null, if the key not found or an error occurred
-
setValue
boolean setValue(java.lang.String key, java.lang.Object value)Sets the given status value. The old value if overwritten. If the key is pointing to a subtree, the whole subtree is overwritten with the new value (which can be a final value or a subtree).- Parameters:
key- a registry key specified as the path (e.g., "server/pid")value- a final value or a JSON object- Returns:
- whether the operation succeeded
-
-