Package org.eclipse.scanning.sequencer
Class SequencerActivator
java.lang.Object
org.eclipse.scanning.sequencer.SequencerActivator
- All Implemented Interfaces:
IServiceResolver,org.osgi.framework.BundleActivator
public class SequencerActivator
extends Object
implements org.osgi.framework.BundleActivator, IServiceResolver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IServiceResolver<T> TgetService(Class<T> serviceClass) Method comparable to getting a service from OSGi without making a dependency on OGSi in this bundle.getService(String serviceClass) <T> Collection<T> getServices(Class<T> serviceClass) Try and get all the declaring instances of a given service.static booleanvoidstart(org.osgi.framework.BundleContext c) voidstop(org.osgi.framework.BundleContext c)
-
Constructor Details
-
SequencerActivator
public SequencerActivator()
-
-
Method Details
-
start
- Specified by:
startin interfaceorg.osgi.framework.BundleActivator- Throws:
Exception
-
stop
- Specified by:
stopin interfaceorg.osgi.framework.BundleActivator- Throws:
Exception
-
getService
Description copied from interface:IServiceResolverMethod comparable to getting a service from OSGi without making a dependency on OGSi in this bundle.- Specified by:
getServicein interfaceIServiceResolver- Parameters:
serviceClass- the class to get the service for- Returns:
- the service for the given class, or
nullif no such service exists
-
getService
-
isStarted
public static boolean isStarted() -
getInstance
-
getServices
public <T> Collection<T> getServices(Class<T> serviceClass) throws org.osgi.framework.InvalidSyntaxException Description copied from interface:IServiceResolverTry and get all the declaring instances of a given service.- Specified by:
getServicesin interfaceIServiceResolver- 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:
org.osgi.framework.InvalidSyntaxException
-