public class StandardServiceManager extends Object implements ServiceManager
ServiceManager
interface.Constructor and Description |
---|
StandardServiceManager(SearchConfiguration searchConfiguration,
BuildContext buildContext) |
StandardServiceManager(SearchConfiguration searchConfiguration,
BuildContext buildContext,
Map<Class<? extends Service>,String> defaultServices) |
Modifier and Type | Method and Description |
---|---|
void |
releaseAllServices()
Stops and releases all services.
|
<S extends Service> |
releaseService(Class<S> serviceRole)
Releases the service in the specified service role.
|
<S extends Service> |
requestService(Class<S> serviceRole)
Gets the service in the specified service role.
|
public StandardServiceManager(SearchConfiguration searchConfiguration, BuildContext buildContext)
public StandardServiceManager(SearchConfiguration searchConfiguration, BuildContext buildContext, Map<Class<? extends Service>,String> defaultServices)
public <S extends Service> S requestService(Class<S> serviceRole)
ServiceManager
requestService
in interface ServiceManager
S
- the type of the serviceserviceRole
- the service to retrieve. Cannot be null
.public <S extends Service> void releaseService(Class<S> serviceRole)
ServiceManager
releaseService
in interface ServiceManager
S
- the type of the serviceserviceRole
- the service to be released. Cannot be null
.public void releaseAllServices()
ServiceManager
IllegalStateException
will be thrown in this case.releaseAllServices
in interface ServiceManager
Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved