org.apache.commons.monitoring.impl.repositories
Class ConfigurableImplementationsRepository

java.lang.Object
  extended by org.apache.commons.monitoring.impl.repositories.AbstractRepository
      extended by org.apache.commons.monitoring.impl.repositories.ObservableRepository
          extended by org.apache.commons.monitoring.impl.repositories.CreateMonitorsOnDemandRepository
              extended by org.apache.commons.monitoring.impl.repositories.ConfigurableImplementationsRepository
All Implemented Interfaces:
Repository, Repository.Observable
Direct Known Subclasses:
DefaultRepository

public class ConfigurableImplementationsRepository
extends CreateMonitorsOnDemandRepository

Author:
Nicolas De Loof

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.commons.monitoring.Repository
Repository.Listener, Repository.Observable
 
Field Summary
 
Fields inherited from class org.apache.commons.monitoring.impl.repositories.ObservableRepository
listeners
 
Constructor Summary
ConfigurableImplementationsRepository(java.lang.Class<? extends StopWatch> stopWatchImplementation, java.lang.Class<? extends Monitor> monitorImplementation)
          Constructor
 
Method Summary
protected  Monitor newMonitorInstance(Monitor.Key key)
          
protected  void setMonitorImplementation(java.lang.Class<? extends Monitor> implementation)
           
protected  void setStopWatchImplementation(java.lang.Class<? extends StopWatch> implementation)
           
 StopWatch start(Monitor monitor)
          Start a StopWatch to monitor execution
 
Methods inherited from class org.apache.commons.monitoring.impl.repositories.CreateMonitorsOnDemandRepository
getMonitor
 
Methods inherited from class org.apache.commons.monitoring.impl.repositories.ObservableRepository
addListener, register, removeListener
 
Methods inherited from class org.apache.commons.monitoring.impl.repositories.AbstractRepository
getCategories, getMonitor, getMonitor, getMonitor, getMonitors, getMonitorsFromCategory, getMonitorsFromSubSystem, getSubSystems, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.monitoring.Repository
getCategories, getMonitor, getMonitor, getMonitor, getMonitors, getMonitorsFromCategory, getMonitorsFromSubSystem, getSubSystems, reset
 

Constructor Detail

ConfigurableImplementationsRepository

public ConfigurableImplementationsRepository(java.lang.Class<? extends StopWatch> stopWatchImplementation,
                                             java.lang.Class<? extends Monitor> monitorImplementation)
Constructor

Parameters:
stopWatchImplementation - the StopWatch implementation to use
monitorImplementation - the Monitor implementation to use
Method Detail

setStopWatchImplementation

protected void setStopWatchImplementation(java.lang.Class<? extends StopWatch> implementation)

setMonitorImplementation

protected void setMonitorImplementation(java.lang.Class<? extends Monitor> implementation)

newMonitorInstance

protected Monitor newMonitorInstance(Monitor.Key key)

Specified by:
newMonitorInstance in class CreateMonitorsOnDemandRepository
See Also:
org.apache.commons.monitoring.impl.repositories.AbstractRepository#newMonitorInstance(org.apache.commons.monitoring.Monitor.Key)

start

public StopWatch start(Monitor monitor)
Start a StopWatch to monitor execution

Parameters:
monitor - the monitor associated with the process
Returns:
a running StopWatch
See Also:
Repository.start(org.apache.commons.monitoring.Monitor)


Copyright © 2008 The Apache Software Foundation. All Rights Reserved.