public abstract class ForwardingServiceRegistry extends Object implements ServiceRegistry
| Constructor and Description |
|---|
ForwardingServiceRegistry() |
| 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
BootstrapServices by calling BootstrapService.cleanupAfterBoot() on each registered
BootstrapService. |
<S extends Service> |
contains(Class<S> type)
Check if a service is registered
|
protected abstract ServiceRegistry |
delegate() |
Set<Map.Entry<Class<? extends Service>,Service>> |
entrySet() |
<S extends Service> |
get(Class<S> type)
Retrieve a service implementation
|
Iterator<Service> |
iterator() |
protected abstract ServiceRegistry delegate()
public <S extends Service> void add(Class<S> type, S service)
ServiceRegistryadd in interface ServiceRegistryS - the service type to addservice - the service implementationServicepublic <S extends Service> boolean contains(Class<S> type)
ServiceRegistrycontains in interface ServiceRegistryS - the service typepublic <S extends Service> S get(Class<S> type)
ServiceRegistryget in interface ServiceRegistryS - the service typepublic void addAll(Collection<Map.Entry<Class<? extends Service>,Service>> services)
ServiceRegistryaddAll in interface ServiceRegistrypublic Set<Map.Entry<Class<? extends Service>,Service>> entrySet()
entrySet in interface ServiceRegistrypublic void cleanup()
ServiceRegistryService.cleanup() on each registered servicecleanup in interface ServiceRegistrypublic void cleanupAfterBoot()
ServiceRegistryBootstrapServices by calling BootstrapService.cleanupAfterBoot() on each registered
BootstrapService.cleanupAfterBoot in interface ServiceRegistryCopyright © 2013 Seam Framework. All Rights Reserved.