1 8 package org.picocontainer.defaults; 9 10 import org.picocontainer.ComponentMonitor; 11 12 import java.io.Serializable ; 13 14 20 public abstract class AbstractMonitoringLifecycleStrategy implements LifecycleStrategy, ComponentMonitorStrategy, Serializable { 21 22 private ComponentMonitor componentMonitor; 23 24 30 public AbstractMonitoringLifecycleStrategy(ComponentMonitor monitor) { 31 if (monitor == null) { 32 throw new NullPointerException ("Monitor is null"); 33 } 34 this.componentMonitor = monitor; 35 } 36 37 public void changeMonitor(ComponentMonitor monitor) { 38 if (monitor == null) { 39 throw new NullPointerException ("Monitor is null"); 40 } 41 this.componentMonitor = monitor; 42 } 43 44 public ComponentMonitor currentMonitor() { 45 return componentMonitor; 46 } 47 48 } 49 | Popular Tags |