org.apache.avalon.cornerstone.blocks.masterstore
Class File_Persistent_Stream_Repository

java.lang.Object
  extended byorg.apache.avalon.cornerstone.blocks.masterstore.AbstractFileRepository
      extended byorg.apache.avalon.cornerstone.blocks.masterstore.AbstractFilePersistentStreamRepository
          extended byorg.apache.avalon.cornerstone.blocks.masterstore.File_Persistent_Stream_Repository
All Implemented Interfaces:
Configurable, Contextualizable, Initializable, LogEnabled, Repository, StreamRepository

public class File_Persistent_Stream_Repository
extends AbstractFilePersistentStreamRepository
implements StreamRepository, Contextualizable, Initializable, Configurable, LogEnabled

Implementation of a StreamRepository to a File. TODO: -retieve(String key) should return a FilterInputStream to allow mark and reset methods. (working not like BufferedInputStream!!!)

Author:
Federico Barbieri

Field Summary
 
Fields inherited from class org.apache.avalon.cornerstone.blocks.masterstore.AbstractFilePersistentStreamRepository
m_inputs, m_outputs
 
Fields inherited from class org.apache.avalon.cornerstone.blocks.masterstore.AbstractFileRepository
BYTE_MASK, DEBUG, HANDLED_URL, HEX_DIGITS, m_baseDirectory, m_destination, m_extension, m_filter, m_name, m_path, monitor
 
Constructor Summary
File_Persistent_Stream_Repository()
           
 
Method Summary
 void configure(Configuration configuration)
          Configuration of the component by the container.
 void contextualize(Context context)
          Contextualization of the component by the container during which the working home directory will be provided.
 void enableLogging(Logger logger)
          Provide component with a logger.
 void initialize()
          Initialization of the component by the container.
protected  void initializeChild(AbstractFileRepository child)
           
 
Methods inherited from class org.apache.avalon.cornerstone.blocks.masterstore.AbstractFilePersistentStreamRepository
get, getExtensionDecorator, put, remove
 
Methods inherited from class org.apache.avalon.cornerstone.blocks.masterstore.AbstractFileRepository
containsKey, createChildRepository, decode, encode, getChildRepository, getFile, getInputStream, getOutputStream, list, setDestination
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.avalon.cornerstone.services.store.StreamRepository
get, list, put, remove
 
Methods inherited from interface org.apache.avalon.cornerstone.services.store.Repository
getChildRepository
 

Constructor Detail

File_Persistent_Stream_Repository

public File_Persistent_Stream_Repository()
Method Detail

enableLogging

public void enableLogging(Logger logger)
Description copied from interface: LogEnabled
Provide component with a logger.

Specified by:
enableLogging in interface LogEnabled
Parameters:
logger - the logger. Must not be null.

initializeChild

protected void initializeChild(AbstractFileRepository child)
                        throws java.lang.Exception
Specified by:
initializeChild in class AbstractFileRepository
Throws:
java.lang.Exception

contextualize

public void contextualize(Context context)
                   throws ContextException
Contextualization of the component by the container during which the working home directory will be provided.

Specified by:
contextualize in interface Contextualizable
Parameters:
context - the supplied context object
Throws:
ContextException - if context is invalid

initialize

public void initialize()
                throws java.lang.Exception
Initialization of the component by the container.

Specified by:
initialize in interface Initializable
Throws:
java.lang.Exception - if a initialization stage error occurs

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Configuration of the component by the container.

Specified by:
configure in interface Configurable
Parameters:
configuration - the configuration
Throws:
ConfigurationException - if a configuration error occurs


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.