org.scijava.plugin
Interface SingletonService<PT extends SingletonPlugin>

Type Parameters:
PT - Plugin type of the plugins being managed.
All Superinterfaces:
Comparable<Prioritized>, Contextual, Disposable, HasPluginInfo, Prioritized, PTService<PT>, RichPlugin, SciJavaPlugin, Service
All Known Subinterfaces:
AppService, ConsoleService, ConvertService, DragAndDropService, HandlerService<DT,PT>, IOService, OptionsService, PlatformService, ScriptHeaderService, ScriptService, TextService, ToolService
All Known Implementing Classes:
AbstractConvertService, AbstractHandlerService, AbstractSingletonService, DefaultAppService, DefaultConsoleService, DefaultConvertService, DefaultDragAndDropService, DefaultIOService, DefaultOptionsService, DefaultPlatformService, DefaultScriptHeaderService, DefaultScriptService, DefaultTextService, DefaultToolService

public interface SingletonService<PT extends SingletonPlugin>
extends PTService<PT>

A service for managing SingletonPlugins of a particular type. The SingletonService creates and maintain a list of singleton instances.

Note that like PTService, TypedService and WrapperService, SingletonService is not a service interface defining API for a specific concrete service implementation, but rather a more general layer in a type hierarchy intended to ease creation of services that fit its pattern.

Author:
Curtis Rueden
See Also:
PTService

Method Summary
<P extends PT>
P
getInstance(Class<P> pluginClass)
          Gets the singleton plugin instance of the given class.
 List<PT> getInstances()
          Gets the list of plugin instances.
 
Methods inherited from interface org.scijava.plugin.PTService
create, getPlugins, getPluginService, getPluginType
 
Methods inherited from interface org.scijava.service.Service
initialize, registerEventHandlers
 
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
 
Methods inherited from interface org.scijava.Prioritized
getPriority, setPriority
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
 
Methods inherited from interface org.scijava.Disposable
dispose
 

Method Detail

getInstances

List<PT> getInstances()
Gets the list of plugin instances. There will be one singleton instance for each available plugin.


getInstance

<P extends PT> P getInstance(Class<P> pluginClass)
Gets the singleton plugin instance of the given class.



Copyright © 2009–2015 SciJava. All rights reserved.