public class MailRepositoryStoreBeanFactory extends AbstractBeanFactory implements MailRepositoryStore, LogEnabled, Configurable
MailRepositoryStore.MailRepositoryStoreException| Constructor and Description |
|---|
MailRepositoryStoreBeanFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.apache.commons.configuration.HierarchicalConfiguration configuration)
Configure the object.
|
List<String> |
getUrls()
Return a
List which contains all urls of the selected
MailRepository's |
void |
init() |
void |
registerRepository(org.apache.commons.configuration.HierarchicalConfiguration repConf)
Registers a new mail repository type in the mail store's registry based
upon a passed in
Configuration object. |
MailRepository |
select(String destination)
This method accept a Configuration object as hint and return the
corresponding MailRepository.
|
void |
setLog(org.slf4j.Logger logger)
Sets the service log.
|
getBeanFactory, setBeanFactorypublic void configure(org.apache.commons.configuration.HierarchicalConfiguration configuration)
throws org.apache.commons.configuration.ConfigurationException
Configurableconfigure in interface Configurableorg.apache.commons.configuration.ConfigurationExceptionConfigurable.configure(org.apache.commons.configuration.HierarchicalConfiguration)@PostConstruct public void init() throws Exception
Exceptionpublic void registerRepository(org.apache.commons.configuration.HierarchicalConfiguration repConf)
throws org.apache.commons.configuration.ConfigurationException
Registers a new mail repository type in the mail store's registry based
upon a passed in Configuration object.
This is presumably synchronized to prevent corruption of the internal registry.
repConf - the Configuration object used to register the repositoryorg.apache.commons.configuration.ConfigurationException - if an error occurs accessing the Configuration objectpublic MailRepository select(String destination) throws MailRepositoryStore.MailRepositoryStoreException
<repository destinationURL="[URL of this mail repository]"
type="[repository type ex. OBJECT or STREAM or MAIL etc.]"
model="[repository model ex. PERSISTENT or CACHE etc.]">
[addition configuration]
</repository>
select in interface MailRepositoryStoredestination - the destinationURL used to look up the repositoryMailRepositoryStoreException - if any error occurs while parsing the Configuration or
retrieving the MailRepositoryMailRepositoryStore.MailRepositoryStoreExceptionpublic List<String> getUrls()
MailRepositoryStoreList which contains all urls of the selected
MailRepository'sgetUrls in interface MailRepositoryStoreMailRepositoryStore.getUrls()public void setLog(org.slf4j.Logger logger)
LogEnabledsetLog in interface LogEnabledlogger - not nullCopyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.