Package psiprobe.beans.stats.listeners
Class AbstractStatsCollectionListener
- java.lang.Object
-
- psiprobe.beans.stats.listeners.AbstractStatsCollectionListener
-
- All Implemented Interfaces:
StatsCollectionListener
- Direct Known Subclasses:
AbstractThresholdListener
public abstract class AbstractStatsCollectionListener extends Object implements StatsCollectionListener
The listener interface for receiving abstractStatsCollection events. The class that is interested in processing a abstractStatsCollection event implements this interface, and the object created with that class is registered with a component using the component'saddAbstractStatsCollectionListener
method. When the abstractStatsCollection event occurs, that object's appropriate method is invoked.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
enabled
The enabled.protected org.slf4j.Logger
logger
The logger.private String
propertyCategory
The property category.
-
Constructor Summary
Constructors Constructor Description AbstractStatsCollectionListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getPropertyCategory()
Gets the property category.protected String
getPropertyKey(String name, String attribute)
Gets the property key.private String
getPropertyKey(String category, String name, String attribute)
Gets the property key.protected String
getPropertyValue(String key)
Gets the property value.protected String
getPropertyValue(String name, String attribute)
Gets the property value.boolean
isEnabled()
Checks if is enabled.void
reset()
Reset.protected void
setEnabled(boolean enabled)
Sets the enabled.void
setPropertyCategory(String propertyCategory)
Sets the property category.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface psiprobe.beans.stats.listeners.StatsCollectionListener
statsCollected
-
-
-
-
Field Detail
-
logger
protected final org.slf4j.Logger logger
The logger.
-
propertyCategory
private String propertyCategory
The property category.
-
enabled
private boolean enabled
The enabled.
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
Description copied from interface:StatsCollectionListener
Checks if is enabled.- Specified by:
isEnabled
in interfaceStatsCollectionListener
- Returns:
- true, if is enabled
-
setEnabled
protected void setEnabled(boolean enabled)
Sets the enabled.- Parameters:
enabled
- the new enabled
-
getPropertyValue
protected String getPropertyValue(String name, String attribute)
Gets the property value.- Parameters:
name
- the nameattribute
- the attribute- Returns:
- the property value
-
getPropertyValue
protected String getPropertyValue(String key)
Gets the property value.- Parameters:
key
- the key- Returns:
- the property value
-
getPropertyKey
protected String getPropertyKey(String name, String attribute)
Gets the property key.- Parameters:
name
- the nameattribute
- the attribute- Returns:
- the property key
-
getPropertyKey
private String getPropertyKey(String category, String name, String attribute)
Gets the property key.- Parameters:
category
- the categoryname
- the nameattribute
- the attribute- Returns:
- the property key
-
reset
public void reset()
Reset.
-
getPropertyCategory
public String getPropertyCategory()
Gets the property category.- Returns:
- the property category
-
setPropertyCategory
public void setPropertyCategory(String propertyCategory)
Sets the property category.- Parameters:
propertyCategory
- the new property category
-
-