|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.cache.factories.XmlConfigurationParser
public class XmlConfigurationParser
Reads in XMLconfiguration files and spits out a Configuration
object. When deployed as a
JBoss MBean, this role is performed by the JBoss Microcontainer. This class is only used internally in unit tests
or within CacheFactory
implementations for standalone JBoss Cache usage.
Field Summary | |
---|---|
static java.lang.String |
ATTR
|
static java.lang.String |
NAME
|
Constructor Summary | |
---|---|
XmlConfigurationParser()
|
Method Summary | |
---|---|
protected static org.jboss.cache.factories.XmlConfigurationParser.ParsedAttributes |
extractAttributes(org.w3c.dom.Element source)
|
protected java.io.InputStream |
getAsInputStreamFromClassLoader(java.lang.String filename)
|
protected org.w3c.dom.Element |
getMBeanElement(org.w3c.dom.Element root)
|
protected void |
handleRemovedAttributes(org.jboss.cache.factories.XmlConfigurationParser.ParsedAttributes attributes)
Check for and remove any attributes that were supported in the 1.x releases and no longer are. |
static BuddyReplicationConfig |
parseBuddyReplicationConfig(org.w3c.dom.Element element)
|
static CacheLoaderConfig |
parseCacheLoaderConfig(org.w3c.dom.Element element)
|
static java.lang.String |
parseClusterConfigXml(org.w3c.dom.Element config)
Parses the cluster config which is used to start a JGroups channel |
static EvictionConfig |
parseEvictionConfig(org.w3c.dom.Element element)
|
static void |
parseEvictionPolicyConfig(org.w3c.dom.Element element,
EvictionPolicyConfig target)
|
static EvictionRegionConfig |
parseEvictionRegionConfig(org.w3c.dom.Element element,
java.lang.String defaultEvictionClass,
int defaultQueueCapacity)
|
Configuration |
parseFile(java.lang.String filename)
Parses an XML file and returns a new configuration. |
protected Configuration |
parseStream(java.io.InputStream stream)
Parses an input stream containing XML text and returns a new configuration. |
protected static void |
setValues(java.lang.Object target,
java.util.Map<?,?> attribs,
boolean isXmlAttribs)
|
protected void |
setXmlValues(Configuration conf,
java.util.Map<java.lang.String,org.w3c.dom.Element> attribs)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ATTR
public static final java.lang.String NAME
Constructor Detail |
---|
public XmlConfigurationParser()
Method Detail |
---|
public Configuration parseFile(java.lang.String filename)
protected Configuration parseStream(java.io.InputStream stream)
protected void handleRemovedAttributes(org.jboss.cache.factories.XmlConfigurationParser.ParsedAttributes attributes)
ConfigurationException
if any are found. Which is done depends
on the attribute:
attributes
- protected java.io.InputStream getAsInputStreamFromClassLoader(java.lang.String filename)
protected org.w3c.dom.Element getMBeanElement(org.w3c.dom.Element root)
protected static void setValues(java.lang.Object target, java.util.Map<?,?> attribs, boolean isXmlAttribs)
protected void setXmlValues(Configuration conf, java.util.Map<java.lang.String,org.w3c.dom.Element> attribs)
public static BuddyReplicationConfig parseBuddyReplicationConfig(org.w3c.dom.Element element)
public static CacheLoaderConfig parseCacheLoaderConfig(org.w3c.dom.Element element)
public static EvictionConfig parseEvictionConfig(org.w3c.dom.Element element)
public static EvictionRegionConfig parseEvictionRegionConfig(org.w3c.dom.Element element, java.lang.String defaultEvictionClass, int defaultQueueCapacity)
public static void parseEvictionPolicyConfig(org.w3c.dom.Element element, EvictionPolicyConfig target)
public static java.lang.String parseClusterConfigXml(org.w3c.dom.Element config)
config
- an old-style JGroups protocol config Stringprotected static org.jboss.cache.factories.XmlConfigurationParser.ParsedAttributes extractAttributes(org.w3c.dom.Element source)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |