org.apache.avalon.framework.service
public class DefaultServiceSelector extends Object implements ServiceSelector
Version: CVS $Revision: 1.14 $ $Date: 2003/02/25 15:35:43 $
Constructor Summary | |
---|---|
DefaultServiceSelector()
Create a DefaultServiceSelector with a default empty role. | |
DefaultServiceSelector(String role)
Create a DefaultServiceSelector with a role for debug purposes.
|
Method Summary | |
---|---|
protected void | checkWriteable()
Checks if this service selector is writeable.
|
protected Map | getObjectMap()
Helper method for subclasses to retrieve object map.
|
boolean | isSelectable(Object hint)
Returns whether a Object exists or not |
void | makeReadOnly()
Makes this service selector read-only.
|
void | put(Object hint, Object object)
Populate the ServiceSelector. |
void | release(Object object)
Release object.
|
Object | select(Object hint)
Select the desired object.
|
Parameters: role The role for this selector.
Throws: NullPointerException if the role is null.
Throws: IllegalStateException if this service selector is read-only
Returns: the object map
Parameters: hint the hint to retrieve Object
Returns: true
if the Object exists
Parameters: hint the hint to be used to retrieve the Object later object the Object to hold
Parameters: object the Object
to release
Parameters: hint the hint to retrieve Object
Returns: the Object
Throws: ServiceException if an error occurs