Package org.eclipse.scanning.api
Interface IServiceResolver
- All Known Implementing Classes:
Activator,SequencerActivator
public interface IServiceResolver
This interface exists to provide a mechanism for scanning.api to
find services from OSGi without making a dependency on OSGi directy
or having an activator of this bundle. It means that the API bundle
stays totally vanilla which is a goal such that anyone may use
service interfaces it defines regardless of mechanism.
-
Method Summary
Modifier and TypeMethodDescription<T> TgetService(Class<T> serviceClass) Method comparable to getting a service from OSGi without making a dependency on OGSi in this bundle.<T> Collection<T> getServices(Class<T> serviceClass) Try and get all the declaring instances of a given service.
-
Method Details
-
getService
Method comparable to getting a service from OSGi without making a dependency on OGSi in this bundle.- Parameters:
serviceClass- the class to get the service for- Returns:
- the service for the given class, or
nullif no such service exists
-
getServices
Try and get all the declaring instances of a given service.- Parameters:
serviceClass- the class to get the services for- Returns:
- the services for the given class, or an empty collection if no such services exist
- Throws:
Exception
-