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 Object
Since:
1.3
Author:
Jan Waller
  • Field Details

  • Constructor Details

    • AbstractController

      protected AbstractController(Configuration configuration)
      Default constructor.
      Parameters:
      configuration - The configuration for this controller.
  • Method Details

    • 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

      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

      public abstract String toString()
      Overrides:
      toString in class Object
    • 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 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.