public class SimpleServiceRegistry extends java.lang.Object implements ServiceRegistry
| Constructor and Description |
|---|
SimpleServiceRegistry() |
| Modifier and Type | Method and Description |
|---|---|
<S extends Service> |
add(java.lang.Class<S> type,
S service)
Add a service
|
void |
addAll(java.util.Collection<java.util.Map.Entry<java.lang.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(java.lang.Class<S> type)
Check if a service is registered
|
java.util.Set<java.util.Map.Entry<java.lang.Class<? extends Service>,Service>> |
entrySet() |
boolean |
equals(java.lang.Object obj) |
protected java.util.Map<java.lang.Class<? extends Service>,Service> |
get() |
<S extends Service> |
get(java.lang.Class<S> type)
Retrieve a service implementation
|
int |
hashCode() |
java.util.Iterator<Service> |
iterator() |
java.lang.String |
toString() |
public <S extends Service> void add(java.lang.Class<S> type, S service)
ServiceRegistryadd in interface ServiceRegistryS - the service type to addservice - the service implementationServicepublic void addAll(java.util.Collection<java.util.Map.Entry<java.lang.Class<? extends Service>,Service>> services)
ServiceRegistryaddAll in interface ServiceRegistrypublic java.util.Set<java.util.Map.Entry<java.lang.Class<? extends Service>,Service>> entrySet()
entrySet in interface ServiceRegistrypublic <S extends Service> S get(java.lang.Class<S> type)
ServiceRegistryget in interface ServiceRegistryS - the service typepublic <S extends Service> boolean contains(java.lang.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 ServiceRegistrypublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectCopyright © 2014. All Rights Reserved.