|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.logger.AbstractLoggable | +--org.apache.james.mailrepository.JDBCMailRepository
Implementation of a MailRepository on a database.
Requires a configuration element in the .conf.xml file of the form:
model="SYNCHRONOUS"/>
destinationURL specifies..(Serge??)
Type can be SPOOL or MAIL
Model is currently not used and may be dropped
Requires a logger called MailRepository.
Field Summary | |
protected org.apache.avalon.framework.context.Context |
context
|
protected org.apache.avalon.excalibur.datasource.DataSourceComponent |
datasource
|
protected java.lang.String |
datasourceName
|
protected org.apache.avalon.cornerstone.services.datasource.DataSourceSelector |
datasources
|
protected java.lang.String |
destination
|
protected java.lang.String |
filestore
|
protected java.lang.String |
repositoryName
|
protected java.lang.String |
sqlFileName
|
protected SqlResources |
sqlQueries
|
protected java.lang.String |
tableName
|
Fields inherited from interface org.apache.james.services.MailRepository |
MAIL |
Constructor Summary | |
JDBCMailRepository()
|
Method Summary | |
void |
compose(org.apache.avalon.framework.component.ComponentManager componentManager)
|
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
|
void |
contextualize(org.apache.avalon.framework.context.Context context)
|
boolean |
equals(java.lang.Object obj)
|
protected java.sql.Connection |
getConnection()
Opens a database connection. |
void |
initialize()
Initialises the JDBC repository. |
java.util.Iterator |
list()
List string keys of messages in repository. |
boolean |
lock(java.lang.String key)
Obtains a lock on a message identified by key |
void |
remove(MailImpl mail)
Removes a specified message |
void |
remove(java.lang.String key)
Removes a message identified by key. |
MailImpl |
retrieve(java.lang.String key)
Retrieves a message given a key. |
void |
store(MailImpl mc)
Stores a message in this repository. |
boolean |
unlock(java.lang.String key)
Releases a lock on a message identified the key |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable |
getLogger, setLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.apache.avalon.framework.context.Context context
protected java.lang.String destination
protected java.lang.String tableName
protected java.lang.String repositoryName
protected java.lang.String filestore
protected java.lang.String sqlFileName
protected org.apache.avalon.cornerstone.services.datasource.DataSourceSelector datasources
protected org.apache.avalon.excalibur.datasource.DataSourceComponent datasource
protected java.lang.String datasourceName
protected SqlResources sqlQueries
Constructor Detail |
public JDBCMailRepository()
Method Detail |
public void contextualize(org.apache.avalon.framework.context.Context context) throws org.apache.avalon.framework.context.ContextException
contextualize
in interface org.apache.avalon.framework.context.Contextualizable
public void configure(org.apache.avalon.framework.configuration.Configuration conf) throws org.apache.avalon.framework.configuration.ConfigurationException
configure
in interface org.apache.avalon.framework.configuration.Configurable
public void compose(org.apache.avalon.framework.component.ComponentManager componentManager) throws org.apache.avalon.framework.component.ComponentException
compose
in interface org.apache.avalon.framework.component.Composable
public void initialize() throws java.lang.Exception
initialize
in interface org.apache.avalon.framework.activity.Initializable
public boolean unlock(java.lang.String key)
MailRepository
unlock
in interface MailRepository
public boolean lock(java.lang.String key)
MailRepository
lock
in interface MailRepository
public void store(MailImpl mc)
MailRepository
store
in interface MailRepository
public MailImpl retrieve(java.lang.String key)
MailRepository
retrieve
in interface MailRepository
public void remove(MailImpl mail)
MailRepository
remove
in interface MailRepository
public void remove(java.lang.String key)
MailRepository
remove
in interface MailRepository
public java.util.Iterator list()
MailRepository
list
in interface MailRepository
protected java.sql.Connection getConnection()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |