1 8 package org.apache.avalon.excalibur.system; 9 10 import org.apache.avalon.framework.component.Component; 11 12 import java.util.ArrayList ; 13 import java.util.Collections ; 14 import java.util.HashMap ; 15 import java.util.List ; 16 import java.util.Map ; 17 18 26 public class ExcaliburRoleManager 27 extends AbstractRoleManager 28 { 29 32 public ExcaliburRoleManager() 33 { 34 super( null ); 35 } 36 37 43 public ExcaliburRoleManager(RoleManager parent) 44 { 45 super( parent, Thread.currentThread().getContextClassLoader() ); 46 } 47 48 54 public ExcaliburRoleManager(RoleManager parent, ClassLoader loader) 55 { 56 super( parent, loader ); 57 58 HashMap shorts = new HashMap ( 10 ); 59 HashMap classes = new HashMap ( 10 ); 60 HashMap handlers = new HashMap ( 10 ); 61 62 63 setup( shorts, classes, handlers, "cache", 64 "org.apache.avalon.excalibur.cache.Cache", 65 "org.apache.avalon.excalibur.cache.DefaultCache", 66 "org.apache.avalon.excalibur.system.handler.ThreadSafeComponentHandler" ); 67 setup( shorts, classes, handlers, "lru-cache", 68 "org.apache.avalon.excalibur.cache.Cache", 69 "org.apache.avalon.excalibur.cache.LRUCache", 70 "org.apache.avalon.excalibur.system.handler.ThreadSafeComponentHandler" ); 71 72 73 setup( shorts, classes, handlers, "jdbc-datasource", 74 "org.apache.avalon.excalibur.datasource.DataSourceComponent", 75 "org.apache.avalon.excalibur.datasource.JdbcDataSource", 76 "org.apache.avalon.excalibur.system.handler.ThreadSafeComponentHandler" ); 77 setup( shorts, classes, handlers, "j2ee-datasource", 78 "org.apache.avalon.excalibur.datasource.DataSourceComponent", 79 "org.apache.avalon.excalibur.datasource.J2eeDataSource", 80 "org.apache.avalon.excalibur.system.handler.ThreadSafeComponentHandler" ); 81 setup( shorts, classes, handlers, "informix-datasource", 82 "org.apache.avalon.excalibur.datasource.DataSourceComponent", 83 "org.apache.avalon.excalibur.datasource.InformixDataSource", 84 "org.apache.avalon.excalibur.system.handler.ThreadSafeComponentHandler" ); 85 86 87 setup( shorts, classes, handlers, "i18n", 88 "org.apache.avalon.excalibur.i18n.BundleSelector", 89 "org.apache.avalon.excalibur.i18n.BundleSelector", 90 "org.apache.avalon.excalibur.system.handler.ThreadSafeComponentHandler" ); 91 92 93 setup( shorts, classes, handlers, "monitor", 94 "org.apache.avalon.excalibur.monitor.Monitor", 95 "org.apache.avalon.excalibur.monitor.ActiveMonitor", 96 "org.apache.avalon.excalibur.system.handler.ThreadSafeComponentHandler" ); 97 setup( shorts, classes, handlers, "passive-monitor", 98 "org.apache.avalon.excalibur.monitor.Monitor", 99 "org.apache.avalon.excalibur.monitor.PassiveMonitor", 100 "org.apache.avalon.excalibur.system.handler.ThreadSafeComponentHandler" ); 101 102 103 setup( shorts, classes, handlers, "xalan-xpath", 104 "org.apache.avalon.excalibur.xml.xpath.XPathProcessor", 105 "org.apache.avalon.excalibur.xml.xpath.XPathProcessorImpl", 106 "org.apache.avalon.excalibur.system.handler.ThreadSafeComponentHandler" ); 107 setup( shorts, classes, handlers, "jaxpath", 108 "org.apache.avalon.excalibur.xml.xpath.XPathProcessor", 109 "org.apache.avalon.excalibur.xml.xpath.JaxenProcessorImpl", 110 "org.apache.avalon.excalibur.system.handler.ThreadSafeComponentHandler" ); 111 112 113 setup( shorts, classes, handlers, "jaxpath", 114 "org.apache.avalon.excalibur.source.SourceResolver", 115 "org.apache.avalon.excalibur.source.SourceResolverImpl", 116 "org.apache.avalon.excalibur.system.handler.ThreadSafeComponentHandler" ); 117 118 119 setup( shorts, classes, handlers, "parser", 120 "org.apache.avalon.excalibur.xml.Parser", 121 "org.apache.avalon.excalibur.xml.JaxpParser", 122 "org.apache.avalon.excalibur.system.handler.PoolableComponentHandler" ); 123 setup( shorts, classes, handlers, "xerces-parser", 124 "org.apache.avalon.excalibur.xml.Parser", 125 "org.apache.avalon.excalibur.xml.XercesParser", 126 "org.apache.avalon.excalibur.system.handler.FactoryComponentHandler" ); 127 128 m_shorthands = Collections.unmodifiableMap( shorts ); 129 m_classNames = Collections.unmodifiableMap( classes ); 130 m_handlerNames = Collections.unmodifiableMap( handlers ); 131 } 132 } 133 | Popular Tags |