|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectAbstractDynamicMBean
com.admc.jamama.repository.MitFileRepository
Stores in-transit messages in Sendmail-spool-file-like files. TODO: Write more efficiently. No need for a printwriter here. This implementation of Repository does not use destKeys, since every in-transit message corresponds to its own unique file in the directory.
| Constructor Summary | |
MitFileRepository()
|
|
| Method Summary | |
boolean |
addDestKey(java.lang.String key)
Make the supplied destKey a valid destKey. |
java.lang.Object[] |
arrayFetch(java.lang.String queryString,
java.lang.String destKey)
Fetch the reqeusted objects. |
void |
configure(java.lang.Object inCfg)
Initialize the object's state with information in the given Jaxb object. |
protected MBeanAttributeInfo[] |
createMBeanAttributeInfo()
|
java.lang.Object |
fetch(java.lang.String key,
java.lang.String destKey)
Fetch the requested object. |
java.lang.Object |
getConfig()
Returns the Jaxb object used to configure this. |
java.lang.String |
getDirectory()
Get directory in which mail folders reside |
protected java.lang.String |
getMBeanDescription()
|
java.lang.String |
getName()
Name which Jamama config file uses to identify this object instance. |
java.lang.Class[] |
getPersistableClasses()
Tell what classes this Repository implementation can handle. |
StringSet |
getValidDestKeys()
Return a list of valid destination keys. |
boolean |
isDestKeyValid(java.lang.String key)
Says whether the given destKey is valid. |
java.lang.String |
persist(java.lang.Object o,
java.lang.String destKey)
Primary key needs to come from Message-Id. |
java.lang.String |
persist(java.lang.Object o,
java.lang.String d,
boolean b)
Completely replaces the files for this primary key and replaces them with new files. |
boolean |
remove(java.lang.Object object,
java.lang.String destKey)
Remove the given object from storage. |
boolean |
removeDestKey(java.lang.String key)
Make the supplied destKey an invalid destKey. |
void |
setDestKeys(StringSet keys)
|
void |
setDirectory(java.lang.String inDirectory)
Set directory in which mail folders reside |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MitFileRepository()
| Method Detail |
protected MBeanAttributeInfo[] createMBeanAttributeInfo()
protected java.lang.String getMBeanDescription()
public void setDestKeys(StringSet keys)
public boolean addDestKey(java.lang.String key)
Repository
addDestKey in interface Repositorykey - The key to be added to the valid destKey list.
public boolean removeDestKey(java.lang.String key)
Repository
removeDestKey in interface Repositorykey - The key to be removed from the valid destKey list.
public java.lang.Class[] getPersistableClasses()
Repository
getPersistableClasses in interface RepositoryRepositorypublic StringSet getValidDestKeys()
Repository
getValidDestKeys in interface RepositoryRepositorypublic boolean isDestKeyValid(java.lang.String key)
Repository
isDestKeyValid in interface Repositorykey - The destKey to be checked.
public java.lang.String persist(java.lang.Object o,
java.lang.String d,
boolean b)
throws UnsupportedClassException,
java.io.IOException
persist in interface Repositoryo - The object to store. It must be an implementation
of a supported class.d - A valid destination keyb - Whether the primary key (as determined by the
Repository implementation) must already be in
storage for the given destKey.
UnsupportedClassException - if object does not implement a
supported class.
java.io.IOException#persist(Object... I forget how to Javadoc this ref.,
2-argument persiste method.
public java.lang.String persist(java.lang.Object o,
java.lang.String destKey)
throws UnsupportedClassException,
java.io.IOException
persist in interface Repositoryo - The object to store. It must be an implementation
of a supported class.destKey - A valid destination key
UnsupportedClassException - if object does not implement a
supported class.
java.io.IOExceptionRepositorypublic void configure(java.lang.Object inCfg)
Configurable
configure in interface ConfigurableinCfg - A Jaxb object corresponding to a XML document branch.Configurablepublic void setDirectory(java.lang.String inDirectory)
public java.lang.String getDirectory()
public java.lang.String getName()
Configurable
getName in interface ConfigurableConfigurablepublic java.lang.Object getConfig()
Configurable
getConfig in interface ConfigurableConfigurable
public boolean remove(java.lang.Object object,
java.lang.String destKey)
throws java.io.IOException
Repository
remove in interface Repositoryobject - The object to remove. Only the generated primary
key (as generated by the Repository implementation)
is used.destKey - A valid destination key for the given stored object
java.io.IOException
public java.lang.Object fetch(java.lang.String key,
java.lang.String destKey)
throws java.io.IOException
Repository
fetch in interface Repositorykey - Primary key of object to fetchdestKey - A valid destination key
java.io.IOException
public java.lang.Object[] arrayFetch(java.lang.String queryString,
java.lang.String destKey)
throws java.io.IOException
Repository
arrayFetch in interface RepositoryqueryString - A string used by the Repository implementation
to identify the subset of objects to fetch.destKey - A valid destination key
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||