1 16 17 package org.apache.catalina.storeconfig; 18 19 import java.io.PrintWriter ; 20 21 import org.apache.catalina.core.StandardContext; 22 import org.apache.commons.logging.Log; 23 import org.apache.commons.logging.LogFactory; 24 25 29 public class WrapperListenerSF extends StoreFactoryBase { 30 private static Log log = LogFactory.getLog(WrapperListenerSF.class); 31 32 38 public void store(PrintWriter aWriter, int indent, Object aElement) 39 throws Exception { 40 if (aElement instanceof StandardContext) { 41 StoreDescription elementDesc = getRegistry().findDescription( 42 aElement.getClass().getName() + ".[WrapperListener]"); 43 String [] listeners = ((StandardContext) aElement) 44 .findWrapperListeners(); 45 if (elementDesc != null) { 46 if (log.isDebugEnabled()) 47 log.debug("store " + elementDesc.getTag() + "( " + aElement 48 + " )"); 49 getStoreAppender().printTagArray(aWriter, "WrapperListener", 50 indent, listeners); 51 } 52 } else 53 log.warn("Descriptor for element" + aElement.getClass() 54 + ".[WrapperListener] not configured!"); 55 } 56 } | Popular Tags |