org.apache.james.mailrepository.filepair
Class File_Persistent_Object_Repository

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLogEnabled
        |
        +--org.apache.james.mailrepository.filepair.AbstractFileRepository
              |
              +--org.apache.james.mailrepository.filepair.File_Persistent_Object_Repository
All Implemented Interfaces:
Component, Configurable, Contextualizable, Initializable, LogEnabled, ObjectRepository, Repository, Serviceable

public class File_Persistent_Object_Repository
extends AbstractFileRepository
implements ObjectRepository

This is a simple implementation of persistent object store using object serialization on the file system.

Author:
Stefano Mazzocchi, Federico Barbieri, Paul Hammant

Field Summary
 
Fields inherited from class org.apache.james.mailrepository.filepair.AbstractFileRepository
BYTE_MASK, DEBUG, HANDLED_URL, HEX_DIGITS, m_baseDirectory, m_context, m_destination, m_extension, m_filter, m_name, m_path, m_serviceManager
 
Constructor Summary
File_Persistent_Object_Repository()
           
 
Method Summary
 Object get(String key)
          Get the object associated to the given unique key.
 Object get(String key, ClassLoader classLoader)
           
protected  String getExtensionDecorator()
           
 void put(String key, Object value)
          Store the given object and associates it to the given key
 
Methods inherited from class org.apache.james.mailrepository.filepair.AbstractFileRepository
configure, containsKey, contextualize, createChildRepository, decode, encode, getChildRepository, getFile, getInputStream, getOutputStream, initialize, list, remove, service, setDestination
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
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.ObjectRepository
containsKey, list, remove
 
Methods inherited from interface org.apache.avalon.cornerstone.services.store.Repository
getChildRepository
 

Constructor Detail

File_Persistent_Object_Repository

public File_Persistent_Object_Repository()
Method Detail

getExtensionDecorator

protected String getExtensionDecorator()
Specified by:
getExtensionDecorator in class AbstractFileRepository

get

public Object get(String key)
Get the object associated to the given unique key.

Specified by:
get in interface ObjectRepository

get

public Object get(String key,
                  ClassLoader classLoader)
Specified by:
get in interface ObjectRepository

put

public void put(String key,
                Object value)
Store the given object and associates it to the given key

Specified by:
put in interface ObjectRepository


"Copyright © 1999-2002 Apache Jakarta Project. All Rights Reserved."