net.sf.infrared.agent.util
Class ConfigurationProvider

java.lang.Object
  extended bynet.sf.infrared.agent.util.ConfigurationProvider
All Implemented Interfaces:
MonitorConfig

public class ConfigurationProvider
extends Object
implements MonitorConfig

Class to read the properties file.


Field Summary
static String COLLECTION_STRATEGY_CLASS
           
static String DEFAULT_COLLECTION_STRATEGY_CLASS
           
static String INFRARED_PROPERTIES
           
 
Constructor Summary
ConfigurationProvider()
           
 
Method Summary
 void enableCallTracing(boolean enable)
           
 void enableJDBCFecthStatisticsCollection(boolean enable)
           
 void enableJDBCMonitoring(boolean enable)
           
 void enableJDBCResourceLeakDetectionEnabled(boolean enable)
           
 void enableJDBCTrackResourceAquisitionLocationEnabled(boolean enable)
           
 void enableMonitoring(boolean enable)
           
 void enableMonitoringForCurrentThread(boolean enable)
           
 String getCollectionStrategy()
           
 int getNoOfLastInvocationsToBeTracked()
           
 String getProperty(String propertyName)
          Retrieve the value for given parameter name This method is make it easier to add new properties without having to modify all the classes.
 long getPruneThreshold()
           
 boolean isCallTracingEnabled()
           
 boolean isDebugLoggingEnabled()
           
 boolean isDefensiveChecksEnabled()
           
 boolean isJDBCFecthStatisticsCollectionEnabled()
           
 boolean isJDBCMonitoringEnabled()
           
 boolean isJDBCResourceLeakDetectionEnabled()
           
 boolean isJDBCTrackResourceAquisitionLocationEnabled()
           
 boolean isMonitoringEnabled()
          Indicates whether the collection of summary statistics at method level is enabled
 boolean isMonitoringEnabledForCurrentThread()
           
 void setDefensiveChecksEnabled(boolean enable)
           
 void setNoOfLastInvocationsToBeTracked(int noOfLastInvocationsToBeTracked)
           
 void setProperty(String propertyName, String propertyValue)
           
 void setPruneThreshold(long pruneThreshold)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INFRARED_PROPERTIES

public static final String INFRARED_PROPERTIES
See Also:
Constant Field Values

COLLECTION_STRATEGY_CLASS

public static final String COLLECTION_STRATEGY_CLASS
See Also:
Constant Field Values

DEFAULT_COLLECTION_STRATEGY_CLASS

public static final String DEFAULT_COLLECTION_STRATEGY_CLASS
See Also:
Constant Field Values
Constructor Detail

ConfigurationProvider

public ConfigurationProvider()
Method Detail

isMonitoringEnabled

public boolean isMonitoringEnabled()
Description copied from interface: MonitorConfig
Indicates whether the collection of summary statistics at method level is enabled

Specified by:
isMonitoringEnabled in interface MonitorConfig
Returns:

isMonitoringEnabledForCurrentThread

public boolean isMonitoringEnabledForCurrentThread()
Specified by:
isMonitoringEnabledForCurrentThread in interface MonitorConfig

enableMonitoring

public void enableMonitoring(boolean enable)
Specified by:
enableMonitoring in interface MonitorConfig

enableMonitoringForCurrentThread

public void enableMonitoringForCurrentThread(boolean enable)
Specified by:
enableMonitoringForCurrentThread in interface MonitorConfig

isCallTracingEnabled

public boolean isCallTracingEnabled()
Specified by:
isCallTracingEnabled in interface MonitorConfig

enableCallTracing

public void enableCallTracing(boolean enable)
Specified by:
enableCallTracing in interface MonitorConfig

isJDBCMonitoringEnabled

public boolean isJDBCMonitoringEnabled()
Specified by:
isJDBCMonitoringEnabled in interface MonitorConfig

enableJDBCMonitoring

public void enableJDBCMonitoring(boolean enable)
Specified by:
enableJDBCMonitoring in interface MonitorConfig

isJDBCFecthStatisticsCollectionEnabled

public boolean isJDBCFecthStatisticsCollectionEnabled()
Specified by:
isJDBCFecthStatisticsCollectionEnabled in interface MonitorConfig

enableJDBCFecthStatisticsCollection

public void enableJDBCFecthStatisticsCollection(boolean enable)
Specified by:
enableJDBCFecthStatisticsCollection in interface MonitorConfig

isJDBCResourceLeakDetectionEnabled

public boolean isJDBCResourceLeakDetectionEnabled()
Specified by:
isJDBCResourceLeakDetectionEnabled in interface MonitorConfig

enableJDBCResourceLeakDetectionEnabled

public void enableJDBCResourceLeakDetectionEnabled(boolean enable)
Specified by:
enableJDBCResourceLeakDetectionEnabled in interface MonitorConfig

isJDBCTrackResourceAquisitionLocationEnabled

public boolean isJDBCTrackResourceAquisitionLocationEnabled()
Specified by:
isJDBCTrackResourceAquisitionLocationEnabled in interface MonitorConfig

enableJDBCTrackResourceAquisitionLocationEnabled

public void enableJDBCTrackResourceAquisitionLocationEnabled(boolean enable)
Specified by:
enableJDBCTrackResourceAquisitionLocationEnabled in interface MonitorConfig

getPruneThreshold

public long getPruneThreshold()
Specified by:
getPruneThreshold in interface MonitorConfig

setPruneThreshold

public void setPruneThreshold(long pruneThreshold)
Specified by:
setPruneThreshold in interface MonitorConfig

getNoOfLastInvocationsToBeTracked

public int getNoOfLastInvocationsToBeTracked()
Specified by:
getNoOfLastInvocationsToBeTracked in interface MonitorConfig

setNoOfLastInvocationsToBeTracked

public void setNoOfLastInvocationsToBeTracked(int noOfLastInvocationsToBeTracked)
Specified by:
setNoOfLastInvocationsToBeTracked in interface MonitorConfig

isDefensiveChecksEnabled

public boolean isDefensiveChecksEnabled()
Specified by:
isDefensiveChecksEnabled in interface MonitorConfig

setDefensiveChecksEnabled

public void setDefensiveChecksEnabled(boolean enable)
Specified by:
setDefensiveChecksEnabled in interface MonitorConfig

isDebugLoggingEnabled

public boolean isDebugLoggingEnabled()
Specified by:
isDebugLoggingEnabled in interface MonitorConfig

getCollectionStrategy

public String getCollectionStrategy()
Specified by:
getCollectionStrategy in interface MonitorConfig

getProperty

public String getProperty(String propertyName)
Description copied from interface: MonitorConfig
Retrieve the value for given parameter name This method is make it easier to add new properties without having to modify all the classes.

Specified by:
getProperty in interface MonitorConfig
Parameters:
propertyName -
Returns:

setProperty

public void setProperty(String propertyName,
                        String propertyValue)
Specified by:
setProperty in interface MonitorConfig