Class StateController
java.lang.Object
kieker.monitoring.core.controller.AbstractController
kieker.monitoring.core.controller.StateController
- All Implemented Interfaces:
IStateController
public final class StateController extends AbstractController implements IStateController
- Since:
- 1.3
- Author:
- Andre van Hoorn, Jan Waller
-
Field Summary
Fields inherited from class kieker.monitoring.core.controller.AbstractController
monitoringController -
Constructor Summary
Constructors Modifier Constructor Description protectedStateController(Configuration configuration)Creates a new instance of this class using the given parameter. -
Method Summary
Modifier and Type Method Description protected voidcleanup()This method should clean up.booleandisableMonitoring()Disables monitoring.booleanenableMonitoring()Enables monitoring.java.lang.StringgetApplicationName()intgetExperimentId()java.lang.StringgetHostname()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.StringgetName()Returns the name of this controller.intincExperimentId()Increments the experiment ID by 1 and returns the new value.protected voidinit()This method should to the initialization work.booleanisDebug()Is the debug mode enabled?booleanisMonitoringEnabled()Returns whether monitoring is enabled or disabled/terminated.booleanisMonitoringTerminated()Returns whether monitoring is permanently terminated.voidsetExperimentId(int newExperimentID)Sets the experiment ID to the given value.voidsetStateListener(IStateListener stateListener)booleanterminateMonitoring()Permanently terminates monitoring.java.lang.StringtoString()Methods inherited from class kieker.monitoring.core.controller.AbstractController
createAndInitialize, isTerminated, setMonitoringController, terminate
-
Constructor Details
-
StateController
Creates a new instance of this class using the given parameter.- Parameters:
configuration- The configuration which will be used to initialize the controller.
-
-
Method Details
-
init
protected void init()Description copied from class:AbstractControllerThis method should to the initialization work.- Specified by:
initin classAbstractController
-
cleanup
protected void cleanup()Description copied from class:AbstractControllerThis method should clean up.- Specified by:
cleanupin classAbstractController
-
toString
public java.lang.String toString()- Specified by:
toStringin classAbstractController
-
terminateMonitoring
public boolean terminateMonitoring()Permanently terminates monitoring.- Specified by:
terminateMonitoringin interfaceIStateController- Returns:
- true if now terminated; false if already terminated
- See Also:
IStateController.isMonitoringTerminated()
-
isMonitoringTerminated
public boolean isMonitoringTerminated()Description copied from interface:IStateControllerReturns whether monitoring is permanently terminated.- Specified by:
isMonitoringTerminatedin interfaceIStateController- Returns:
- true if monitoring is permanently terminated, false if monitoring is enabled or disabled.
- See Also:
IStateController.terminateMonitoring()
-
enableMonitoring
public boolean enableMonitoring()Enables monitoring.- Specified by:
enableMonitoringin interfaceIStateController- Returns:
- true if monitoring is enabled, false otherwise
-
disableMonitoring
public boolean disableMonitoring()Disables monitoring. If monitoring is disabled, the MonitoringController simply pauses. Furthermore, probes should stop collecting new data and monitoring writers stop should stop writing existing data.- Specified by:
disableMonitoringin interfaceIStateController- Returns:
- true if monitoring is disabled, false otherwise
-
isMonitoringEnabled
public boolean isMonitoringEnabled()Description copied from interface:IStateControllerReturns whether monitoring is enabled or disabled/terminated.- Specified by:
isMonitoringEnabledin interfaceIStateController- Returns:
- true of monitoring is enabled, false if monitoring is disabled or terminated.
- See Also:
IStateController.disableMonitoring(),IStateController.enableMonitoring()
-
getName
public java.lang.String getName()Description copied from interface:IStateControllerReturns the name of this controller.- Specified by:
getNamein interfaceIStateController- Returns:
- String
-
getHostname
public java.lang.String getHostname()Description copied from interface:IStateControllerThe 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. When you want to distinguish multiple Virtual Machines on one host, you* have to set the hostname manually in the Configuration.- Specified by:
getHostnamein interfaceIStateController- Returns:
- The hostname.
-
incExperimentId
public int incExperimentId()Increments the experiment ID by 1 and returns the new value.- Specified by:
incExperimentIdin interfaceIStateController- Returns:
- experimentID
-
setExperimentId
public void setExperimentId(int newExperimentID)Sets the experiment ID to the given value.- Specified by:
setExperimentIdin interfaceIStateController- Parameters:
newExperimentID- The new ID.
-
getExperimentId
public int getExperimentId()- Specified by:
getExperimentIdin interfaceIStateController- Returns:
- The experiment ID.
-
isDebug
public boolean isDebug()Description copied from interface:IStateControllerIs the debug mode enabled?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.
- Specified by:
isDebugin interfaceIStateController- Returns:
- debug mode
-
setStateListener
-
getApplicationName
public java.lang.String getApplicationName()
-