public class SimpleServiceRegistry extends Object implements ServiceRegistry
| Constructor and Description |
|---|
SimpleServiceRegistry() |
| 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
|
Set<Map.Entry<Class<? extends Service>,Service>> |
entrySet() |
boolean |
equals(Object obj) |
protected Map<Class<? extends Service>,Service> |
get() |
<S extends Service> |
get(Class<S> type)
Retrieve a service implementation
|
int |
hashCode() |
Iterator<Service> |
iterator() |
String |
toString() |
public <S extends Service> void add(Class<S> type, S service)
ServiceRegistryadd in interface ServiceRegistryS - the service type to addservice - the service implementationServicepublic 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 <S extends Service> S get(Class<S> type)
ServiceRegistryget in interface ServiceRegistryS - the service typepublic <S extends Service> boolean contains(Class<S> type)
ServiceRegistrycontains in interface ServiceRegistryS - the service typepublic 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 © 2008-2013 Seam Framework. All Rights Reserved.