public interface ServiceRegistry extends Iterable<Service>
Modifier and Type | Method and Description |
---|---|
<S extends Service> |
add(Class<S> type,
S service)
Add a service
|
void |
addAll(Collection<Map.Entry<Class<? extends Service>,Service>> services)
Add services
|
void |
cleanup()
Clear up the services registered, by calling
Service.cleanup() on each registered service |
void |
cleanupAfterBoot()
Clean up
BootstrapService s by calling BootstrapService.cleanupAfterBoot() on each registered
BootstrapService . |
<S extends Service> |
contains(Class<S> type)
Check if a service is registered
|
Set<Map.Entry<Class<? extends Service>,Service>> |
entrySet() |
<S extends Service> |
get(Class<S> type)
Retrieve a service implementation
|
forEach, iterator, spliterator
<S extends Service> void add(Class<S> type, S service)
S
- the service type to addtype
- the service type to addservice
- the service implementationService
void addAll(Collection<Map.Entry<Class<? extends Service>,Service>> services)
services
- services to be added<S extends Service> S get(Class<S> type)
S
- the service typetype
- the service type<S extends Service> boolean contains(Class<S> type)
S
- the service typetype
- the service typevoid cleanup()
Service.cleanup()
on each registered servicevoid cleanupAfterBoot()
BootstrapService
s by calling BootstrapService.cleanupAfterBoot()
on each registered
BootstrapService
.Copyright © 2008-2015. All Rights Reserved.