Class ProbeController
java.lang.Object
kieker.monitoring.core.controller.AbstractController
kieker.monitoring.core.controller.ProbeController
- All Implemented Interfaces:
IProbeController
public class ProbeController extends AbstractController implements IProbeController
- Since:
- 1.6
- Author:
- Jan Waller, Bjoern Weissenfels, Nils Christian Ehmke
-
Field Summary
Fields inherited from class kieker.monitoring.core.controller.AbstractController
monitoringController -
Constructor Summary
Constructors Modifier Constructor Description protectedProbeController(Configuration configuration)Creates a new instance of this class using the given configuration to initialize the class. -
Method Summary
Modifier and Type Method Description booleanactivateProbe(java.lang.String pattern)Activates a probe.voidaddPatternParameter(java.lang.String pattern, java.lang.String name, java.util.List<java.lang.String> values)Adds or updates a parameter for the given pattern.voidaddPatternParameterValue(java.lang.String pattern, java.lang.String name, java.lang.String value)Add one value to a list of parameter values for a pattern.protected voidcleanup()This method should clean up.voidclearPatternParameters(java.lang.String pattern)Deletes all parameters from the given pattern.booleandeactivateProbe(java.lang.String pattern)Deactivates a probe.voiddeletePatternParameter(java.lang.String pattern, java.lang.String name)Deletes a parameter from the given pattern.java.util.Map<java.lang.String,java.util.List<java.lang.String>>getAllPatternParameters(java.lang.String pattern)Looks up the parameters for a probe /the pattern of the probe and returns them, may be null.java.util.List<java.lang.String>getProbePatternList()Returns the current list of patterns with a prefix indicating whether the pattern is active or not.protected voidinit()This method should to the initialization work.booleanisProbeActivated(java.lang.String signature)Tests if a probe is active.voidremovePatternParameterValue(java.lang.String pattern, java.lang.String name, java.lang.String value)Remove one value to a list of parameter values for a pattern.voidsetProbePatternList(java.util.List<java.lang.String> strPatternList)Overwrites the current list of patterns with a new pattern list.protected voidsetProbePatternList(java.util.List<java.lang.String> strPatternList, boolean updateConfig)Sets the list of probe patterns.java.lang.StringtoString()Methods inherited from class kieker.monitoring.core.controller.AbstractController
createAndInitialize, isTerminated, setMonitoringController, terminate
-
Constructor Details
-
ProbeController
Creates a new instance of this class using the given configuration to initialize the class.- Parameters:
configuration- The configuration used to initialize this 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
-
activateProbe
public boolean activateProbe(java.lang.String pattern)Activates a probe.- Specified by:
activateProbein interfaceIProbeController- Parameters:
pattern- pattern for the probe- Returns:
- true on success
-
deactivateProbe
public boolean deactivateProbe(java.lang.String pattern)Deactivates a probe.- Specified by:
deactivateProbein interfaceIProbeController- Parameters:
pattern- pattern for the probe- Returns:
- true on success
-
isProbeActivated
public boolean isProbeActivated(java.lang.String signature)Tests if a probe is active. This test is ignorant of the fact whether monitoring itself is enabled/disabled/terminated.- Specified by:
isProbeActivatedin interfaceIProbeController- Parameters:
signature- signature of the probe- Returns:
- true if the probe with this signature is active
-
setProbePatternList
protected void setProbePatternList(java.util.List<java.lang.String> strPatternList, boolean updateConfig)Sets the list of probe patterns.- Parameters:
strPatternList- The new list with pattern strings.updateConfig- Whether the pattern file should be updated or not.
-
setProbePatternList
public void setProbePatternList(java.util.List<java.lang.String> strPatternList)Overwrites the current list of patterns with a new pattern list.- Specified by:
setProbePatternListin interfaceIProbeController- Parameters:
strPatternList- list of strings with patterns where each string starts either with a + or -. The list can be empty (in which case the internal pattern list and the internal cache are cleared) - but not null.
-
getProbePatternList
public java.util.List<java.lang.String> getProbePatternList()Returns the current list of patterns with a prefix indicating whether the pattern is active or not.- Specified by:
getProbePatternListin interfaceIProbeController- Returns:
- list of strings with patterns where each string starts either with a + or -
-
getAllPatternParameters
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAllPatternParameters(java.lang.String pattern)Looks up the parameters for a probe /the pattern of the probe and returns them, may be null.- Specified by:
getAllPatternParametersin interfaceIProbeController- Parameters:
pattern- The pattern of the probe.- Returns:
- The parameters of the probe, may be null.
-
deletePatternParameter
public void deletePatternParameter(java.lang.String pattern, java.lang.String name)Deletes a parameter from the given pattern.- Specified by:
deletePatternParameterin interfaceIProbeController- Parameters:
pattern- The parameters to be deleted.name- The name of the parameter.
-
clearPatternParameters
public void clearPatternParameters(java.lang.String pattern)Deletes all parameters from the given pattern.- Specified by:
clearPatternParametersin interfaceIProbeController- Parameters:
pattern- The parameters to be deleted.
-
addPatternParameter
public void addPatternParameter(java.lang.String pattern, java.lang.String name, java.util.List<java.lang.String> values)Adds or updates a parameter for the given pattern.- Specified by:
addPatternParameterin interfaceIProbeController- Parameters:
pattern- The pattern of the probe.name- The name of the parameter.values- a List of entries for this parameter.
-
addPatternParameterValue
public void addPatternParameterValue(java.lang.String pattern, java.lang.String name, java.lang.String value)Description copied from interface:IProbeControllerAdd one value to a list of parameter values for a pattern.- Specified by:
addPatternParameterValuein interfaceIProbeController- Parameters:
pattern- identifying the pattern for the parametername- name of the parametervalue- value to be added to the list of parameter values.
-
removePatternParameterValue
public void removePatternParameterValue(java.lang.String pattern, java.lang.String name, java.lang.String value)Description copied from interface:IProbeControllerRemove one value to a list of parameter values for a pattern.- Specified by:
removePatternParameterValuein interfaceIProbeController- Parameters:
pattern- identifying the pattern for the parametername- name of the parametervalue- value to be removed from the list of parameter values.
-