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, setBeanFactory
public void configure(org.apache.commons.configuration.HierarchicalConfiguration configuration) throws org.apache.commons.configuration.ConfigurationException
Configurable
configure
in interface Configurable
org.apache.commons.configuration.ConfigurationException
Configurable.configure(org.apache.commons.configuration.HierarchicalConfiguration)
@PostConstruct public void init() throws Exception
Exception
public 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 MailRepositoryStore
destination
- the destinationURL used to look up the repositoryMailRepositoryStoreException
- if any error occurs while parsing the Configuration or
retrieving the MailRepositoryMailRepositoryStore.MailRepositoryStoreException
public List<String> getUrls()
MailRepositoryStore
List
which contains all urls of the selected
MailRepository
'sgetUrls
in interface MailRepositoryStore
MailRepositoryStore.getUrls()
public void setLog(org.slf4j.Logger logger)
LogEnabled
setLog
in interface LogEnabled
logger
- not nullCopyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.