Class StateManager
- java.lang.Object
-
- org.opennms.features.datachoices.internal.StateManager
-
public class StateManager extends Object
Maintains state in cfg file: systemid=000-00-00-0000 enabled=true acknowledged-by=admin acknowledged-at=13943454545 Same file also holds: url=http://stats.opennms.org/datachoices/ interval=86400000- Author:
- jwhite
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
StateManager.StateChangeHandler
-
Constructor Summary
Constructors Constructor Description StateManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAndRegenerateSystemId()
String
getOrGenerateSystemId()
Boolean
isEnabled()
void
onIsEnabledChanged(StateManager.StateChangeHandler callback)
void
setEnabled(boolean enabled, String user)
-
-
-
Method Detail
-
isEnabled
public Boolean isEnabled() throws IOException
- Throws:
IOException
-
getOrGenerateSystemId
public String getOrGenerateSystemId() throws IOException
- Throws:
IOException
-
getAndRegenerateSystemId
public String getAndRegenerateSystemId() throws IOException
- Throws:
IOException
-
onIsEnabledChanged
public void onIsEnabledChanged(StateManager.StateChangeHandler callback)
-
-