Class AbstractController
java.lang.Object
kieker.monitoring.core.controller.AbstractController
- Direct Known Subclasses:
JMXController,MonitoringController,ProbeController,SamplingController,StateController,TCPController,TimeSourceController,WriterController
- Since:
- 1.3
- Author:
- Jan Waller
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractController(Configuration configuration) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidcleanup()This method should clean up.protected static final <C> CcreateAndInitialize(Class<C> c, 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 final booleanReturns whether this controller is terminated.protected final voidsetMonitoringController(MonitoringController monitoringController) Sets and initializes the monitoring controller, if it has not been set yet.protected final booleanPermanently terminates this controller.abstract StringtoString()
-
Field Details
-
monitoringController
-
-
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
protected final boolean isTerminated()Returns whether this controller is terminated.- Returns:
- true if terminated
- See Also:
-
init
protected abstract void init()This method should to the initialization work. -
cleanup
protected abstract void cleanup()This method should clean up. -
toString
-
createAndInitialize
protected static final <C> C createAndInitialize(Class<C> c, 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.
-