org.picocontainer.defaults
Class AbstractMonitoringLifecycleStrategy

java.lang.Object
  extended by org.picocontainer.defaults.AbstractMonitoringLifecycleStrategy
All Implemented Interfaces:
java.io.Serializable, ComponentMonitorStrategy, LifecycleStrategy
Direct Known Subclasses:
DefaultLifecycleStrategy

public abstract class AbstractMonitoringLifecycleStrategy
extends java.lang.Object
implements LifecycleStrategy, ComponentMonitorStrategy, java.io.Serializable

Abstract base class for lifecycle strategy implementation supporting a ComponentMonitor.

Since:
1.2
Author:
Jörg Schaible
See Also:
Serialized Form

Field Summary
private  ComponentMonitor componentMonitor
           
 
Constructor Summary
AbstractMonitoringLifecycleStrategy(ComponentMonitor monitor)
          Construct a AbstractMonitoringLifecylceStrategy.
 
Method Summary
 void changeMonitor(ComponentMonitor monitor)
          Changes the component monitor used
 ComponentMonitor currentMonitor()
          Returns the monitor currently used
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.picocontainer.defaults.LifecycleStrategy
dispose, hasLifecycle, start, stop
 

Field Detail

componentMonitor

private ComponentMonitor componentMonitor
Constructor Detail

AbstractMonitoringLifecycleStrategy

public AbstractMonitoringLifecycleStrategy(ComponentMonitor monitor)
Construct a AbstractMonitoringLifecylceStrategy.

Parameters:
monitor - the componentMonitor to use
Throws:
java.lang.NullPointerException - if the monitor is null
Method Detail

changeMonitor

public void changeMonitor(ComponentMonitor monitor)
Description copied from interface: ComponentMonitorStrategy
Changes the component monitor used

Specified by:
changeMonitor in interface ComponentMonitorStrategy
Parameters:
monitor - the new ComponentMonitor to use

currentMonitor

public ComponentMonitor currentMonitor()
Description copied from interface: ComponentMonitorStrategy
Returns the monitor currently used

Specified by:
currentMonitor in interface ComponentMonitorStrategy
Returns:
The ComponentMonitor currently used