Class StateManager
- java.lang.Object
-
- org.opennms.features.datachoices.internal.StateManager
-
public class StateManager extends java.lang.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 java.lang.String
getAndRegenerateSystemId()
java.lang.String
getOrGenerateSystemId()
java.lang.Boolean
isEnabled()
void
onIsEnabledChanged(StateManager.StateChangeHandler callback)
void
setEnabled(boolean enabled, java.lang.String user)
-
-
-
Method Detail
-
isEnabled
public java.lang.Boolean isEnabled() throws java.io.IOException
- Throws:
java.io.IOException
-
setEnabled
public void setEnabled(boolean enabled, java.lang.String user) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getOrGenerateSystemId
public java.lang.String getOrGenerateSystemId() throws java.io.IOException
- Throws:
java.io.IOException
-
getAndRegenerateSystemId
public java.lang.String getAndRegenerateSystemId() throws java.io.IOException
- Throws:
java.io.IOException
-
onIsEnabledChanged
public void onIsEnabledChanged(StateManager.StateChangeHandler callback)
-
-