|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.logger.AbstractLogEnabled | +--org.apache.james.core.AvalonMailStore
Provides a registry of mail repositories. A mail repository is uniquely identified by its destinationURL, type and model.
Field Summary | |
protected ComponentManager |
componentManager
The Avalon component manager used by the instance |
protected Configuration |
configuration
The Avalon configuration used by the instance |
protected Context |
context
The Avalon context used by the instance |
Fields inherited from interface org.apache.james.services.MailStore |
ROLE |
Constructor Summary | |
AvalonMailStore()
|
Method Summary | |
void |
compose(ComponentManager componentManager)
|
void |
configure(Configuration configuration)
|
void |
contextualize(Context context)
|
SpoolRepository |
getInboundSpool()
Returns the mail spool associated with this AvalonMailStore |
static String |
getName()
Returns a new name for a repository. |
boolean |
hasComponent(Object hint)
Returns whether the mail store has a repository corresponding to the passed in hint. |
void |
initialize()
|
void |
registerRepository(Configuration repConf)
Registers a new mail repository type in the mail store's registry based upon a passed in Configuration object. |
void |
release(Component component)
Return the Component when you are finished with it. |
Component |
select(Object hint)
This method accept a Configuration object as hint and return the corresponding MailRepository. |
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 |
Field Detail |
protected Context context
protected Configuration configuration
protected ComponentManager componentManager
Constructor Detail |
public AvalonMailStore()
Method Detail |
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
Contextualizable.contextualize(Context)
public void compose(ComponentManager componentManager) throws ComponentException
compose
in interface Composable
ComponentException
Composable.compose(ComponentManager)
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
Configurable.configure(Configuration)
public void initialize() throws Exception
initialize
in interface Initializable
Exception
Initializable.initialize()
public void registerRepository(Configuration repConf) throws 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
repository
ConfigurationException
- if an error occurs accessing the
Configuration objectpublic Component select(Object hint) throws ComponentException
select
in interface Store
hint
- the Configuration object used to look up the repository
ComponentException
- if any error occurs while parsing the
Configuration or retrieving the
MailRepositorypublic static final String getName()
Returns a new name for a repository.
Synchronized on the AvalonMailStore.class object to ensure against duplication of the repository name
public SpoolRepository getInboundSpool()
getInboundSpool
in interface MailStore
IllegalStateException
- if the inbound spool has not
yet been setpublic boolean hasComponent(Object hint)
hasComponent
in interface ComponentSelector
hint
- the Configuration object used to look up the repository
public void release(Component component)
Component
when you are finished with it. In this
implementation it does nothing
release
in interface ComponentSelector
component
- The Component we are releasing.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |