1 16 17 package org.apache.catalina.storeconfig; 18 19 import java.io.PrintWriter ; 20 21 import org.apache.catalina.Container; 22 import org.apache.catalina.Lifecycle; 23 import org.apache.catalina.LifecycleListener; 24 import org.apache.catalina.connector.Connector; 25 import org.apache.catalina.core.StandardService; 26 import org.apache.commons.logging.Log; 27 import org.apache.commons.logging.LogFactory; 28 29 33 public class StandardServiceSF extends StoreFactoryBase { 34 35 private static Log log = LogFactory.getLog(StandardServiceSF.class); 36 37 45 public void storeChilds(PrintWriter aWriter, int indent, Object aService, 46 StoreDescription parentDesc) throws Exception { 47 if (aService instanceof StandardService) { 48 StandardService service = (StandardService) aService; 49 if (service instanceof Lifecycle) { 51 LifecycleListener listeners[] = ((Lifecycle) service) 52 .findLifecycleListeners(); 53 storeElementArray(aWriter, indent, listeners); 54 } 55 56 Connector connectors[] = service.findConnectors(); 57 storeElementArray(aWriter, indent, connectors); 58 59 Container container = service.getContainer(); 61 if (container != null) { 62 StoreDescription elementDesc = getRegistry().findDescription( 63 container.getClass()); 64 if (elementDesc != null) { 65 IStoreFactory factory = elementDesc.getStoreFactory(); 66 factory.store(aWriter, indent, container); 67 } 68 } 69 } 70 71 } 72 73 } | Popular Tags |