Package org.jboss.msc.service
Interface ServiceRegistry
- All Known Subinterfaces:
ServiceContainer
- All Known Implementing Classes:
DelegatingServiceContainer,DelegatingServiceRegistry
public interface ServiceRegistry
A service registry. Registries can return services by name, or get a collection of service names.
- Author:
- Flavia Rainone, David M. Lloyd
-
Method Summary
Modifier and TypeMethodDescriptiongetRequiredService(ServiceName serviceName) Get a service, throwing an exception if it is not found.getService(ServiceName serviceName) Get a service, returningnullif it is not found.Get a list of service names installed in this registry.
-
Method Details
-
getRequiredService
Get a service, throwing an exception if it is not found.- Parameters:
serviceName- the service name- Returns:
- the service controller for the corresponding service
- Throws:
ServiceNotFoundException- if the service is not present in the registry
-
getService
Get a service, returningnullif it is not found.- Parameters:
serviceName- the service name- Returns:
- the service controller for the corresponding service, or
nullif it is not found
-
getServiceNames
List<ServiceName> getServiceNames()Get a list of service names installed in this registry.- Returns:
- the list
-