Package org.scijava.plugin
Class AbstractSingletonService<PT extends SingletonPlugin>
- java.lang.Object
-
- org.scijava.AbstractContextual
-
- org.scijava.plugin.AbstractRichPlugin
-
- org.scijava.service.AbstractService
-
- org.scijava.plugin.AbstractPTService<PT>
-
- org.scijava.plugin.AbstractSingletonService<PT>
-
- Type Parameters:
PT- Plugin type of theSingletonPlugins being managed.
- All Implemented Interfaces:
Comparable<Prioritized>,Contextual,Disposable,Identifiable,Initializable,Locatable,Logged,HasPluginInfo,PTService<PT>,RichPlugin,SciJavaPlugin,SingletonService<PT>,Prioritized,Service,Versioned
- Direct Known Subclasses:
AbstractHandlerService,DefaultAppService,DefaultOptionsService,DefaultPlatformService,DefaultScriptService,DefaultToolService
public abstract class AbstractSingletonService<PT extends SingletonPlugin> extends AbstractPTService<PT> implements SingletonService<PT>
Abstract base class forSingletonServices.- Author:
- Curtis Rueden
-
-
Constructor Summary
Constructors Constructor Description AbstractSingletonService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <P extends PT>
PgetInstance(Class<P> pluginClass)Gets the singleton plugin instance of the given class.List<PT>getInstances()Gets the list of plugin instances.ObjectServiceobjectService()Gets theObjectServiceupon which this service depends.protected voidonEvent(PluginsAddedEvent event)protected voidonEvent(PluginsRemovedEvent event)-
Methods inherited from class org.scijava.plugin.AbstractPTService
pluginService
-
Methods inherited from class org.scijava.service.AbstractService
getContext, setContext, toString
-
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
getInfo, getPriority, setInfo, setPriority
-
Methods inherited from class org.scijava.AbstractContextual
context
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
-
Methods inherited from interface org.scijava.Disposable
dispose
-
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
-
Methods inherited from interface org.scijava.Locatable
getLocation
-
Methods inherited from interface org.scijava.Prioritized
compareTo, getPriority, setPriority
-
Methods inherited from interface org.scijava.plugin.PTService
getPlugins, getPluginService, getPluginType, pluginService
-
Methods inherited from interface org.scijava.plugin.RichPlugin
getIdentifier, log
-
Methods inherited from interface org.scijava.service.Service
registerEventHandlers
-
Methods inherited from interface org.scijava.plugin.SingletonService
create, filterInstances, initialize
-
Methods inherited from interface org.scijava.Versioned
getVersion
-
-
-
-
Method Detail
-
objectService
public ObjectService objectService()
Description copied from interface:SingletonServiceGets theObjectServiceupon which this service depends.- Specified by:
objectServicein interfaceSingletonService<PT extends SingletonPlugin>
-
getInstances
public List<PT> getInstances()
Description copied from interface:SingletonServiceGets the list of plugin instances. There will be one singleton instance for each available plugin.- Specified by:
getInstancesin interfaceSingletonService<PT extends SingletonPlugin>
-
getInstance
public <P extends PT> P getInstance(Class<P> pluginClass)
Description copied from interface:SingletonServiceGets the singleton plugin instance of the given class.- Specified by:
getInstancein interfaceSingletonService<PT extends SingletonPlugin>
-
onEvent
protected void onEvent(PluginsRemovedEvent event)
-
onEvent
protected void onEvent(PluginsAddedEvent event)
-
-