Overview
This service keeps a ServiceManager instance and other Avalon artificats to simplify access through your application code.
Configuration
Role Configuration
<role name="org.apache.fulcrum.yaafi.service.servicemanager.ServiceManagerService" default-class="org.apache.fulcrum.yaafi.service.servicemanager.ServiceManagerServiceImpl" />
Usage
ServiceManagerServiceImpl.getInstance() returns you an instance of ServiceManager which allows to lookup other services.
ServiceManagerService serviceManagerService = ServiceManagerServiceImpl.getInstance(); Logger logger = serviceManagerService.getAvalonLogger(); boolean hasFoo = serviceManagerService.hasService("Foo"); Foo foo = (Foo) serviceManagerService.lookup("Foo"); File home = (File) serviceManagerService.getContext().get("urn:avalon:home")