JBoss Modular Service Kernel API 1.0.0.CR2

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
 ServiceController<?> getRequiredService(ServiceName serviceName)
          Get a service, throwing an exception if it is not found.
 ServiceController<?> getService(ServiceName serviceName)
          Get a service, returning null 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, returning null 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

JBoss Modular Service Kernel API 1.0.0.CR2

Copyright © 2011 JBoss, a division of Red Hat, Inc.