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 protected
ProbeController(Configuration configuration)
Creates a new instance of this class using the given configuration to initialize the class. -
Method Summary
Modifier and Type Method Description boolean
activateProbe(java.lang.String pattern)
Activates a probe.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.void
addPatternParameterValue(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 void
cleanup()
This method should clean up.void
clearPatternParameters(java.lang.String pattern)
Deletes all parameters from the given pattern.boolean
deactivateProbe(java.lang.String pattern)
Deactivates a probe.void
deletePatternParameter(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 void
init()
This method should to the initialization work.boolean
isProbeActivated(java.lang.String signature)
Tests if a probe is active.void
removePatternParameterValue(java.lang.String pattern, java.lang.String name, java.lang.String value)
Remove one value to a list of parameter values for a pattern.void
setProbePatternList(java.util.List<java.lang.String> strPatternList)
Overwrites the current list of patterns with a new pattern list.protected void
setProbePatternList(java.util.List<java.lang.String> strPatternList, boolean updateConfig)
Sets the list of probe patterns.java.lang.String
toString()
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:AbstractController
This method should to the initialization work.- Specified by:
init
in classAbstractController
-
cleanup
protected void cleanup()Description copied from class:AbstractController
This method should clean up.- Specified by:
cleanup
in classAbstractController
-
toString
public java.lang.String toString()- Specified by:
toString
in classAbstractController
-
activateProbe
public boolean activateProbe(java.lang.String pattern)Activates a probe.- Specified by:
activateProbe
in interfaceIProbeController
- Parameters:
pattern
- pattern for the probe- Returns:
- true on success
-
deactivateProbe
public boolean deactivateProbe(java.lang.String pattern)Deactivates a probe.- Specified by:
deactivateProbe
in 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:
isProbeActivated
in 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:
setProbePatternList
in 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:
getProbePatternList
in 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:
getAllPatternParameters
in 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:
deletePatternParameter
in 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:
clearPatternParameters
in 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:
addPatternParameter
in 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:IProbeController
Add one value to a list of parameter values for a pattern.- Specified by:
addPatternParameterValue
in 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:IProbeController
Remove one value to a list of parameter values for a pattern.- Specified by:
removePatternParameterValue
in interfaceIProbeController
- Parameters:
pattern
- identifying the pattern for the parametername
- name of the parametervalue
- value to be removed from the list of parameter values.
-