1 17 18 package org.apache.avalon.playground; 19 20 import org.apache.avalon.framework.logger.Logger; 21 import org.apache.avalon.framework.logger.AbstractLogEnabled; 22 import org.apache.avalon.framework.service.Serviceable; 23 import org.apache.avalon.framework.service.ServiceManager; 24 import org.apache.avalon.framework.service.ServiceException; 25 26 30 public class Secondary extends AbstractLogEnabled 31 implements Serviceable, SecondaryService 32 { 33 private Logger m_system = null; 34 35 private PrimaryService m_primary = null; 36 37 42 public void enableLogging( Logger logger ) 43 { 44 super.enableLogging( logger ); 45 m_system = logger.getChildLogger( "system" ); 46 logger.info( "logging established" ); 47 } 48 49 54 public void service( ServiceManager manager ) throws ServiceException 55 { 56 m_primary = (PrimaryService) manager.lookup( "primary" ); 57 m_system.info( "primary service resolved" ); 58 } 59 } 60 | Popular Tags |