java.lang.Objectorg.apache.commons.chain.CatalogFactory
Direct Known Subclasses:
CatalogFactoryBase
A CatalogFactory is a class used to store and retrieve Catalog s. The factory allows for a default Catalog as well as Catalog s stored with a name key. Follows the Factory pattern (see GoF).
The base CatalogFactory implementation also implements
a resolution mechanism which allows lookup of a command based on a single
String which encodes both the catalog and command names.
Sean - Schofield$ - Revision: 480477 $ $Date: 2006-11-29 08:34:52 +0000 (Wed, 29 Nov 2006) $| Field Summary | ||
|---|---|---|
| public static final String | DELIMITER | Values passed to the |
| Method from org.apache.commons.chain.CatalogFactory Summary: |
|---|
| addCatalog, clear, getCatalog, getCatalog, getCommand, getInstance, getNames, setCatalog |
| Methods from java.lang.Object: |
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from org.apache.commons.chain.CatalogFactory Detail: |
|---|
Adds a named instance of Catalog to the factory (for subsequent retrieval later). |
Clear all references to registered catalogs, as well as to the relevant class loader. This method should be called, for example, when a web application utilizing this class is removed from service, to allow for garbage collection. |
Gets the default instance of Catalog associated with the factory
(if any); otherwise, return |
Retrieves a Catalog instance by name (if any); otherwise
return |
Return a At this time, the structure of commandID is relatively simple: if the commandID contains a DELIMITER, treat the segment of the commandID up to (but not including) the DELIMITER as the name of a catalog, and the segment following the DELIMITER as a command name within that catalog. If the commandID contains no DELIMITER, treat the commandID as the name of a command in the default catalog. To preserve the possibility of future extensions to this lookup
mechanism, the DELIMITER string should be considered reserved, and
should not be used in command names. commandID values which contain
more than one DELIMITER will cause an
|
Return the singleton CatalogFactory instance
for the relevant |
Return an |
Sets the default instance of Catalog associated with the factory. |