Package org.apache.catalina.storeconfig
Class StoreLoader
- java.lang.Object
-
- org.apache.catalina.storeconfig.StoreLoader
-
public class StoreLoader extends java.lang.ObjectXML Format
Convention:<Registry name="" encoding="UTF-8" > <Description tag="Server" standard="true" default="true" tagClass="org.apache.catalina.core.StandardServer" storeFactoryClass="org.apache.catalina.storeconfig.StandardServerSF"> <TransientAttributes> <Attribute></Attribute> </TransientAttributes> <TransientChildren> <Child></Child> </TransientChildren> </Description> ... </Registry>- Factories at subpackage org.apache.catalina.core.storeconfig.xxxSF .
- Element name are the unique Class name
- SF for StoreFactory
- standard implementation is false
- Registry XML format is a very good option
- Store format is not fix
- We hope with the parent declaration we can build recursive child store operation //dream
- Problem is to access child data from array,collections or normal detail object
- Default definitions for Listener, Valve Resource? - Based on interface type!
-
-
Constructor Summary
Constructors Constructor Description StoreLoader()Constructs a new StoreLoader for parsing store registry XML descriptors.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static DigestercreateDigester()Create and configure the Digester we will be using for setup store registry.StoreRegistrygetRegistry()Returns the StoreRegistry instance loaded from the configuration.java.net.URLgetRegistryResource()Returns the URL of the registry resource that was loaded.voidload(java.lang.String path)Load registry configuration.voidsetRegistry(StoreRegistry registry)Sets the StoreRegistry instance to use.
-
-
-
Field Detail
-
digester
protected static final Digester digester
TheDigesterinstance used to parse registry descriptors.
-
-
Method Detail
-
getRegistry
public StoreRegistry getRegistry()
Returns the StoreRegistry instance loaded from the configuration.- Returns:
- the StoreRegistry instance
-
setRegistry
public void setRegistry(StoreRegistry registry)
Sets the StoreRegistry instance to use.- Parameters:
registry- the StoreRegistry instance
-
createDigester
protected static Digester createDigester()
Create and configure the Digester we will be using for setup store registry.- Returns:
- the XML digester that will be used to parse the configuration
-
load
public void load(java.lang.String path) throws java.lang.ExceptionLoad registry configuration.- Parameters:
path- Path to the configuration file, may be null to use the default name server-registry.xml- Throws:
java.lang.Exception- when the configuration file isn't found or a parse error occurs
-
getRegistryResource
public java.net.URL getRegistryResource()
Returns the URL of the registry resource that was loaded.- Returns:
- the registry resource URL
-
-