org.codehaus.spice.loggerstore.factories
Class AbstractLoggerStoreFactory
java.lang.Object
|
+--org.jcontainer.dna.AbstractLogEnabled
|
+--org.codehaus.spice.loggerstore.factories.AbstractLoggerStoreFactory
- All Implemented Interfaces:
- LogEnabled, LoggerStoreFactory
- Direct Known Subclasses:
- ConsoleLoggerStoreFactory, DOMLog4JLoggerStoreFactory, Jdk14LoggerStoreFactory, LogKitLoggerStoreFactory, PropertyLog4JLoggerStoreFactory
- public abstract class AbstractLoggerStoreFactory
- extends AbstractLogEnabled
- implements LoggerStoreFactory
The abstract class that makes it easy to create LoggerStoreFactory
implementations.
- Version:
- $Revision: 1.1 $ $Date: 2003/11/19 18:22:44 $
- Author:
- Peter Donald
, Mauro Talevi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractLoggerStoreFactory
public AbstractLoggerStoreFactory()
createLoggerStore
public LoggerStore createLoggerStore(Map config)
throws Exception
- Creates a LoggerStore from a given set of configuration parameters. The
configuration map contains entrys specific to the concrete
implementation.
- Specified by:
createLoggerStore
in interface LoggerStoreFactory
- Parameters:
config
- the parameter map to configuration of the store
- Returns:
- the LoggerStore
- Throws:
Exception
- if unable to create the LoggerStore
doCreateLoggerStore
protected abstract LoggerStore doCreateLoggerStore(Map config)
throws Exception
Exception
missingConfiguration
protected LoggerStore missingConfiguration()
throws Exception
- Utility method to throw exception indicating input data was invalid.
- Returns:
- never returns
- Throws:
Exception
- indicating input data was invalid
getInputStream
protected InputStream getInputStream(Map config)
throws Exception
- A utility method to retrieve a InputStream from input map. It will
systematically go through the following steps to attempt to locate the
InputStream stopping at success.
- Lookup LoggerStoreFactory.URL_LOCATION for string defining URL
location of input configuration.
- Lookup java.net.URL for URL
object defining URL location of input configuration.
- Lookup
LoggerStoreFactory.FILE_LOCATION for string defining File location of
input configuration.
- Lookup java.io.File for File object
defining File location of input configuration.
- Lookup
java.io.InputStream for InputStream object.
- Parameters:
config
- the input map
- Returns:
- the InputStream or null if no stream present
- Throws:
Exception
- if there was a problem aquiring stream
Copyright © 2003 Codehaus. All Rights Reserved.