|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.avalon.cornerstone.blocks.masterstore.RepositoryManager
| Field Summary | |
protected java.util.HashMap |
m_classes
|
protected Context |
m_context
|
protected java.util.HashMap |
m_models
|
protected java.util.HashMap |
m_repositories
|
protected ServiceManager |
m_serviceManager
|
| Fields inherited from interface org.apache.avalon.cornerstone.services.store.Store |
ROLE |
| Constructor Summary | |
RepositoryManager()
|
|
| Method Summary | |
void |
configure(Configuration configuration)
Pass the Configuration to the Configurable
class. |
void |
contextualize(Context context)
Pass the Context to the component. |
static java.lang.String |
getName()
|
boolean |
isSelectable(java.lang.Object policy)
Check to see if a Object exists relative to the supplied policy. |
void |
registerRepository(Configuration repConf)
|
void |
release(java.lang.Object service)
Return the Object when you are finished with it. |
java.lang.Object |
select(java.lang.Object policy)
Selects a Repository configured for the given policy. |
void |
service(ServiceManager serviceManager)
Pass the ServiceManager to the Serviceable. |
| 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 java.util.HashMap m_repositories
protected java.util.HashMap m_models
protected java.util.HashMap m_classes
protected ServiceManager m_serviceManager
protected Context m_context
| Constructor Detail |
public RepositoryManager()
| Method Detail |
public void contextualize(Context context)
Contextualizable
contextualize in interface Contextualizablecontext - the context. Must not be null.
public void service(ServiceManager serviceManager)
throws ServiceException
ServiceableServiceManager to the Serviceable.
The Serviceable implementation should use the specified
ServiceManager to acquire the components it needs for
execution.
service in interface ServiceableserviceManager - The ServiceManager which this
Serviceable uses. Must not be null.
ServiceException - if an error occurs
public void configure(Configuration configuration)
throws ConfigurationException
ConfigurableConfiguration to the Configurable
class.
configure in interface Configurableconfiguration - the class configurations. Must not be null.
ConfigurationException - if an error occurs
public void registerRepository(Configuration repConf)
throws ConfigurationException
ConfigurationExceptionpublic void release(java.lang.Object service)
ServiceSelectorObject when you are finished with it. This
allows the ServiceSelector to handle the End-Of-Life Lifecycle
events associated with the Object. Please note, that no
Exception should be thrown at this point. This is to allow easy use of the
ServiceSelector system without having to trap Exceptions on a release.
release in interface ServiceSelectorservice - The Object we are releasing, may also be a
null referencepublic boolean isSelectable(java.lang.Object policy)
ServiceSelectorObject exists relative to the supplied policy.
isSelectable in interface ServiceSelectorpolicy - a Object containing the selection criteria
public java.lang.Object select(java.lang.Object policy)
throws ServiceException
StoreConfiguration.
The following attributes are used by the Store and thus are mandatory
in the policy parameter:
<repository destinationURL="[URL of this repository]"
type="[repository type e.g. OBJECT, STREAM or MAIL]"
model="[repository model e.g. PERSISTENT, CACHE]">
[additional configuration]
</repository>
The policy is used both to select the appropriate Repository and to configure it.
select in interface Storepolicy - a Configuration object identifying the sought Repository
Repository
ServiceException - if no repository matches policypublic static final java.lang.String getName()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||