1 16 17 package org.apache.catalina.storeconfig; 18 19 import java.io.PrintWriter ; 20 21 import org.apache.catalina.Valve; 22 import org.apache.catalina.cluster.CatalinaCluster; 23 import org.apache.catalina.cluster.ClusterDeployer; 24 import org.apache.catalina.cluster.ClusterReceiver; 25 import org.apache.catalina.cluster.ClusterSender; 26 import org.apache.catalina.cluster.MembershipService; 27 import org.apache.commons.logging.Log; 28 import org.apache.commons.logging.LogFactory; 29 30 36 public class CatalinaClusterSF extends StoreFactoryBase { 37 38 private static Log log = LogFactory.getLog(CatalinaClusterSF.class); 39 40 53 public void storeChilds(PrintWriter aWriter, int indent, Object aCluster, 54 StoreDescription parentDesc) throws Exception { 55 if (aCluster instanceof CatalinaCluster) { 56 CatalinaCluster cluster = (CatalinaCluster) aCluster; 57 58 MembershipService service = cluster.getMembershipService(); 60 if (service != null) { 61 storeElement(aWriter, indent, service); 62 } 63 ClusterSender sender = cluster.getClusterSender(); 65 if (sender != null) { 66 storeElement(aWriter, indent, sender); 67 } 68 ClusterReceiver receiver = cluster.getClusterReceiver(); 70 if (receiver != null) { 71 storeElement(aWriter, indent, receiver); 72 } 73 ClusterDeployer deployer = cluster.getClusterDeployer(); 75 if (deployer != null) { 76 storeElement(aWriter, indent, deployer); 77 } 78 Valve valve = cluster.getValve(); 82 if (valve != null) { 83 IStoreFactory elementFactory = getRegistry().findStoreFactory( 84 valve.getClass()); 85 if (elementFactory != null) { 86 StoreDescription desc = getRegistry().findDescription( 87 valve.getClass()); 88 elementFactory.store(aWriter, indent, valve); 89 } 90 } 91 } 92 } 93 } | Popular Tags |