org.apache.avalon.framework.service
public class DefaultServiceManager extends Object implements ServiceManager
ServiceManager. Allow ineritance
and extension so you can generate a tree of ServiceManager each defining
Object scope.
Version: CVS $Revision: 1.18 $ $Date: 2003/02/11 15:58:42 $
| Constructor Summary | |
|---|---|
| DefaultServiceManager()
Construct ServiceManager with no parent.
| |
| DefaultServiceManager(ServiceManager parent)
Construct ServiceManager with specified parent.
| |
| Method Summary | |
|---|---|
| protected void | checkWriteable()
Checks if this ServiceManager is writeable.
|
| protected Map | getObjectMap()
Helper method for subclasses to retrieve object map.
|
| protected ServiceManager | getParent()
Helper method for subclasses to retrieve parent.
|
| boolean | hasService(String key)
Check to see if a Object exists for a key.
|
| Object | lookup(String key)
Retrieve Object by key from ServiceManager.
|
| void | makeReadOnly()
Makes this ServiceManager read-only.
|
| void | put(String key, Object object)
Place Object into ServiceManager.
|
| void | release(Object object)
Release the Object. |
| String | toString()
Build a human readable representation of this
ServiceManager.
|
ServiceManager with no parent.
ServiceManager with specified parent.
Parameters: parent this ServiceManager's parent
ServiceManager is writeable.
Throws: IllegalStateException if this ServiceManager is
read-only
Returns: the object map
Returns: the parent ServiceManager
Object exists for a key.
Parameters: key a string identifying the key to check.
Returns: True if the object exists, False if it does not.
Object by key from ServiceManager.
Parameters: key the key
Returns: the Object
Throws: ServiceException if an error occurs
ServiceManager read-only.
Object into ServiceManager.
Parameters: key the object's key object an Object value
Object.Parameters: object The Object to release.
ServiceManager.
Returns: the description of this ServiceManager