T
- The service type. All services are instances of that type.public interface ServiceRegistry<T>
Modifier and Type | Method and Description |
---|---|
void |
addListener(ServiceRegistryListener<T> listener)
Adds a new registry listener.
|
boolean |
addService(T service)
Adds a new service to this registry.
|
List<ServiceRegistryListener<T>> |
getListeners() |
T |
getService(String className)
Gets a registered service instance for the given class name.
|
Set<T> |
getServices()
Gets all registered services.
|
Class<T> |
getServiceType()
Gets the service type.
|
void |
removeListener(ServiceRegistryListener<T> listener)
Removes an existing registry listener.
|
boolean |
removeService(T service)
Removes an existing service from this registry.
|
Class<T> getServiceType()
T getService(String className)
className
- The name of the service's class.null
if no such exists.boolean addService(T service)
service
- The service to be added.true
if the service has been added.boolean removeService(T service)
service
- The service to be removed.true
if the service has been removed.List<ServiceRegistryListener<T>> getListeners()
void addListener(ServiceRegistryListener<T> listener)
listener
- The registry listener to be added.void removeListener(ServiceRegistryListener<T> listener)
listener
- The registry listener to be removed.Copyright © 2014–2022 European Space Agency (ESA). All rights reserved.