public class ProbeController extends AbstractController implements IProbeController
monitoringController
Modifier | Constructor and Description |
---|---|
protected |
ProbeController(Configuration configuration)
Creates a new instance of this class using the given configuration to
initialize the class.
|
Modifier and Type | Method and 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() |
createAndInitialize, isTerminated, setMonitoringController, terminate
protected ProbeController(Configuration configuration)
configuration
- The configuration used to initialize this controller.protected void init()
AbstractController
init
in class AbstractController
protected void cleanup()
AbstractController
cleanup
in class AbstractController
public java.lang.String toString()
toString
in class AbstractController
public boolean activateProbe(java.lang.String pattern)
activateProbe
in interface IProbeController
pattern
- pattern for the probepublic boolean deactivateProbe(java.lang.String pattern)
deactivateProbe
in interface IProbeController
pattern
- pattern for the probepublic boolean isProbeActivated(java.lang.String signature)
isProbeActivated
in interface IProbeController
signature
- signature of the probeprotected void setProbePatternList(java.util.List<java.lang.String> strPatternList, boolean updateConfig)
strPatternList
- The new list with pattern strings.updateConfig
- Whether the pattern file should be updated or not.public void setProbePatternList(java.util.List<java.lang.String> strPatternList)
setProbePatternList
in interface IProbeController
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.public java.util.List<java.lang.String> getProbePatternList()
getProbePatternList
in interface IProbeController
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAllPatternParameters(java.lang.String pattern)
getAllPatternParameters
in interface IProbeController
pattern
- The pattern of the probe.public void deletePatternParameter(java.lang.String pattern, java.lang.String name)
deletePatternParameter
in interface IProbeController
pattern
- The parameters to be deleted.name
- The name of the parameter.public void clearPatternParameters(java.lang.String pattern)
clearPatternParameters
in interface IProbeController
pattern
- The parameters to be deleted.public void addPatternParameter(java.lang.String pattern, java.lang.String name, java.util.List<java.lang.String> values)
addPatternParameter
in interface IProbeController
pattern
- The pattern of the probe.name
- The name of the parameter.values
- a List of entries for this parameter.public void addPatternParameterValue(java.lang.String pattern, java.lang.String name, java.lang.String value)
IProbeController
addPatternParameterValue
in interface IProbeController
pattern
- identifying the pattern for the parametername
- name of the parametervalue
- value to be added to the list of parameter values.public void removePatternParameterValue(java.lang.String pattern, java.lang.String name, java.lang.String value)
IProbeController
removePatternParameterValue
in interface IProbeController
pattern
- identifying the pattern for the parametername
- name of the parametervalue
- value to be removed from the list of parameter values.Copyright 2020 Kieker Project, http://kieker-monitoring.net