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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ServiceController<?>
getRequiredService(ServiceName serviceName)
Get a service, throwing an exception if it is not found.ServiceController<?>
getService(ServiceName serviceName)
Get a service, returningnull
if it is not found.List<ServiceName>
getServiceNames()
Get a list of service names installed in this registry.
-
-
-
Method Detail
-
getRequiredService
ServiceController<?> getRequiredService(ServiceName serviceName) throws ServiceNotFoundException
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
ServiceController<?> getService(ServiceName serviceName)
Get a service, returningnull
if it is not found.- Parameters:
serviceName
- the service name- Returns:
- the service controller for the corresponding service, or
null
if it is not found
-
getServiceNames
List<ServiceName> getServiceNames()
Get a list of service names installed in this registry.- Returns:
- the list
-
-