Interface ServiceReader
public interface ServiceReader
This code is experimental. While this interface is functional and tested, it may change or be
removed in a future version of the library.
-
Method Summary
Modifier and TypeMethodDescription<S> SgetServiceReference(Class<S> serviceClass) Retrieves the first found service reference.<S> Set<S> getServices(Class<S> serviceClass, String filter) Retrieves all service references matching the class and LDAP filter.
-
Method Details
-
getServiceReference
<S> S getServiceReference(Class<S> serviceClass) throws org.codice.ddf.admin.configurator.ConfiguratorException Retrieves the first found service reference. The reference should only be used for reading purposes, any changes should be done through a commit- Type Parameters:
S- type to be returned- Parameters:
serviceClass- Class of service to retrieve- Returns:
- first found service reference of serviceClass
- Throws:
org.codice.ddf.admin.configurator.ConfiguratorException- if any errors occur
-
getServices
<S> Set<S> getServices(Class<S> serviceClass, String filter) throws org.codice.ddf.admin.configurator.ConfiguratorException Retrieves all service references matching the class and LDAP filter.- Type Parameters:
S- type to be returned- Parameters:
serviceClass- Class of service to retrievefilter- LDAP filter to limit results- Returns:
- all services matching the parameters
- Throws:
org.codice.ddf.admin.configurator.ConfiguratorException- if any errors occur
-