public final class StateController extends AbstractController implements IStateController
monitoringController
Modifier | Constructor and Description |
---|---|
protected |
StateController(Configuration configuration)
Creates a new instance of this class using the given parameter.
|
Modifier and Type | Method and Description |
---|---|
protected void |
cleanup()
This method should clean up.
|
boolean |
disableMonitoring()
Disables monitoring.
|
boolean |
enableMonitoring()
Enables monitoring.
|
java.lang.String |
getApplicationName() |
int |
getExperimentId() |
java.lang.String |
getHostname()
The hostname will be part of the monitoring data and allows to distinguish observations in cases where the software system is deployed on more than one host.
|
java.lang.String |
getName()
Returns the name of this controller.
|
int |
incExperimentId()
Increments the experiment ID by 1 and returns the new value.
|
protected void |
init()
This method should to the initialization work.
|
boolean |
isDebug()
Is the debug mode enabled?
|
boolean |
isMonitoringEnabled()
Returns whether monitoring is enabled or disabled/terminated.
|
boolean |
isMonitoringTerminated()
Returns whether monitoring is permanently terminated.
|
void |
setExperimentId(int newExperimentID)
Sets the experiment ID to the given value.
|
void |
setStateListener(IStateListener stateListener) |
boolean |
terminateMonitoring()
Permanently terminates monitoring.
|
java.lang.String |
toString() |
createAndInitialize, isTerminated, setMonitoringController, terminate
protected StateController(Configuration configuration)
configuration
- The configuration which will be used to initialize the controller.protected void init()
AbstractController
init
in class AbstractController
protected void cleanup()
AbstractController
cleanup
in class AbstractController
public java.lang.String toString()
toString
in class AbstractController
public boolean terminateMonitoring()
terminateMonitoring
in interface IStateController
IStateController.isMonitoringTerminated()
public boolean isMonitoringTerminated()
IStateController
isMonitoringTerminated
in interface IStateController
IStateController.terminateMonitoring()
public boolean enableMonitoring()
enableMonitoring
in interface IStateController
public boolean disableMonitoring()
disableMonitoring
in interface IStateController
public boolean isMonitoringEnabled()
IStateController
isMonitoringEnabled
in interface IStateController
IStateController.disableMonitoring()
,
IStateController.enableMonitoring()
public java.lang.String getName()
IStateController
getName
in interface IStateController
public java.lang.String getHostname()
IStateController
getHostname
in interface IStateController
public int incExperimentId()
incExperimentId
in interface IStateController
public void setExperimentId(int newExperimentID)
setExperimentId
in interface IStateController
newExperimentID
- The new ID.public int getExperimentId()
getExperimentId
in interface IStateController
public boolean isDebug()
IStateController
Debug mode is for internal use only and changes a few internal id generation mechanisms to enable easier debugging. Additionally, it is possible to enable debug logging in the settings of the used logger.
isDebug
in interface IStateController
public void setStateListener(IStateListener stateListener)
public java.lang.String getApplicationName()
Copyright 2021 Kieker Project, http://kieker-monitoring.net