Interface Store

All Superinterfaces:
All Known Implementing Classes:

public interface Store
extends ServiceSelector

Allows selection from a number of configured Repositories. Selection criterion is passed in as a Configuration object.

Federico Barbieri
See Also:
Repository, ObjectRepository, StreamRepository

Field Summary
static java.lang.String ROLE
Method Summary
 java.lang.Object select(java.lang.Object policy)
          Selects a Repository configured for the given policy.
Methods inherited from interface org.apache.avalon.framework.service.ServiceSelector
isSelectable, release

Field Detail


public static final java.lang.String ROLE
Method Detail


public java.lang.Object select(java.lang.Object policy)
                        throws ServiceException
Selects a Repository configured for the given policy. The policy must be an instance of Configuration. 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]

The policy is used both to select the appropriate Repository and to configure it.

Specified by:
select in interface ServiceSelector
policy - a Configuration object identifying the sought Repository
requested Repository
ServiceException - if no repository matches policy

Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.