Kieker 1.11

kieker.monitoring.core.controller
Class AbstractController

java.lang.Object
  extended by kieker.monitoring.core.controller.AbstractController
Direct Known Subclasses:
JMXController, MonitoringController, ProbeController, RegistryController, SamplingController, StateController, TimeSourceController, WriterController

public abstract class AbstractController
extends java.lang.Object

Since:
1.3
Author:
Jan Waller

Field Summary
protected  MonitoringController monitoringController
           
 
Constructor Summary
protected AbstractController(Configuration configuration)
          Default constructor.
 
Method Summary
protected abstract  void cleanup()
          This method should clean up.
protected static
<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 single Configuration.
protected abstract  void init()
          This method should to the initialization work.
protected  boolean isTerminated()
          Returns whether this controller is terminated.
protected  void setMonitoringController(MonitoringController monitoringController)
          Sets and initializes the monitoring controller, if it has not been set yet.
protected  boolean terminate()
          Permanently terminates this controller.
abstract  java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

monitoringController

protected volatile MonitoringController monitoringController
Constructor Detail

AbstractController

protected AbstractController(Configuration configuration)
Default constructor.

Parameters:
configuration - The configuration for this controller.
Method Detail

setMonitoringController

protected final void setMonitoringController(MonitoringController monitoringController)
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:
toString in class java.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 single Configuration.

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.

Kieker 1.11

Copyright 2015 Kieker Project, http://kieker-monitoring.net