Class AbstractController
java.lang.Object
kieker.monitoring.core.controller.AbstractController
- Direct Known Subclasses:
JMXController,MonitoringController,ProbeController,SamplingController,StateController,TCPController,TimeSourceController,WriterController
public abstract class AbstractController
extends java.lang.Object
- Since:
- 1.3
- Author:
- Jan Waller
-
Field Summary
Fields Modifier and Type Field Description protected MonitoringControllermonitoringController -
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractController(Configuration configuration)Default constructor. -
Method Summary
Modifier and Type Method Description protected abstract voidcleanup()This method should clean up.protected static <C> CcreateAndInitialize(java.lang.Class<C> c, java.lang.String classname, Configuration configuration)This is a helper method trying to find, create and initialize the given class, using its public constructor which accepts a singleConfiguration.protected abstract voidinit()This method should to the initialization work.protected booleanisTerminated()Returns whether this controller is terminated.protected voidsetMonitoringController(MonitoringController monitoringController)Sets and initializes the monitoring controller, if it has not been set yet.protected booleanterminate()Permanently terminates this controller.abstract java.lang.StringtoString()
-
Field Details
-
Constructor Details
-
AbstractController
Default constructor.- Parameters:
configuration- The configuration for this controller.
-
-
Method Details
-
setMonitoringController
Sets and initializes the monitoring controller, if it has not been set yet.- Parameters:
monitoringController- The monitoring controller.
-
terminate
protected final boolean terminate()Permanently terminates this controller.- Returns:
- true iff the controller was terminated.
- See Also:
isTerminated()
-
isTerminated
protected final boolean isTerminated()Returns whether this controller is terminated.- Returns:
- true if terminated
- See Also:
terminate()
-
init
protected abstract void init()This method should to the initialization work. -
cleanup
protected abstract void cleanup()This method should clean up. -
toString
public abstract java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
createAndInitialize
protected static final <C> C createAndInitialize(java.lang.Class<C> c, java.lang.String classname, Configuration configuration)This is a helper method trying to find, create and initialize the given class, using its public constructor which accepts a singleConfiguration.- Type Parameters:
C- The type of the returned class.- Parameters:
c- This class defines the expected result of the method call.classname- The name of the class to be created.configuration- The configuration which will be used to initialize the class in question.- Returns:
- A new and initializes class instance if everything went well.
-