1 50 package org.apache.avalon.excalibur.monitor; 51 52 import org.apache.avalon.framework.configuration.Configurable; 53 import org.apache.avalon.framework.configuration.Configuration; 54 import org.apache.avalon.framework.configuration.ConfigurationException; 55 import org.apache.avalon.framework.logger.LogEnabled; 56 import org.apache.avalon.framework.logger.Logger; 57 import org.apache.avalon.framework.thread.ThreadSafe; 58 59 83 public class PassiveMonitor 84 extends org.apache.avalon.excalibur.monitor.impl.PassiveMonitor 85 implements LogEnabled, Configurable, ThreadSafe 86 { 87 private Logger m_logger; 88 89 public void enableLogging( final Logger logger ) 90 { 91 m_logger = logger; 92 } 93 94 public final void configure( final Configuration config ) 95 throws ConfigurationException 96 { 97 final Configuration[] initialResources = 98 config.getChild( "init-resources" ).getChildren( "resource" ); 99 final Resource[] resources = 100 MonitorUtil.configureResources( initialResources, m_logger ); 101 addResources( resources ); 102 } 103 } 104 | Popular Tags |