|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 String |
ATTR
|
static String |
NAME
|
Constructor Summary | |
---|---|
XmlConfigurationParser()
|
Method Summary | |
---|---|
protected static org.jboss.cache.factories.XmlConfigurationParser.ParsedAttributes |
extractAttributes(Element source)
|
protected InputStream |
getAsInputStreamFromClassLoader(String filename)
|
protected Element |
getMBeanElement(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(Element element)
|
static CacheLoaderConfig |
parseCacheLoaderConfig(Element element)
|
static String |
parseClusterConfigXml(Element config)
Parses the cluster config which is used to start a JGroups channel |
Configuration |
parseConfiguration(Element configurationRoot)
|
static EvictionConfig |
parseEvictionConfig(Element element)
|
static void |
parseEvictionPolicyConfig(Element element,
EvictionPolicyConfig target)
|
static EvictionRegionConfig |
parseEvictionRegionConfig(Element element,
String defaultEvictionClass,
int defaultQueueCapacity)
|
Configuration |
parseFile(String filename)
Parses an XML file and returns a new configuration. |
Configuration |
parseStream(InputStream stream)
Parses an input stream containing XML text and returns a new configuration. |
protected static void |
setValues(Object target,
Map<?,?> attribs,
boolean isXmlAttribs)
|
protected void |
setXmlValues(Configuration conf,
Map<String,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 String ATTR
public static final String NAME
Constructor Detail |
---|
public XmlConfigurationParser()
Method Detail |
---|
public Configuration parseFile(String filename)
filename
- the name of the XML file to parse.
public Configuration parseStream(InputStream stream)
stream
- input stream to parse. SHould not be null.
public Configuration parseConfiguration(Element configurationRoot)
protected void handleRemovedAttributes(org.jboss.cache.factories.XmlConfigurationParser.ParsedAttributes attributes)
ConfigurationException
if any are found. Which is done depends
on the attribute:
attributes
- protected InputStream getAsInputStreamFromClassLoader(String filename)
protected Element getMBeanElement(Element root)
protected static void setValues(Object target, Map<?,?> attribs, boolean isXmlAttribs)
protected void setXmlValues(Configuration conf, Map<String,Element> attribs)
public static BuddyReplicationConfig parseBuddyReplicationConfig(Element element)
public static CacheLoaderConfig parseCacheLoaderConfig(Element element)
public static EvictionConfig parseEvictionConfig(Element element)
public static EvictionRegionConfig parseEvictionRegionConfig(Element element, String defaultEvictionClass, int defaultQueueCapacity)
public static void parseEvictionPolicyConfig(Element element, EvictionPolicyConfig target)
public static String parseClusterConfigXml(Element config)
config
- an old-style JGroups protocol config Stringprotected static org.jboss.cache.factories.XmlConfigurationParser.ParsedAttributes extractAttributes(Element source)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |