org.scijava.plugin
Interface PTService<PT extends SciJavaPlugin>

Type Parameters:
PT - Plugin type of the plugins being managed.
All Superinterfaces:
Comparable<Prioritized>, Contextual, Disposable, HasPluginInfo, Prioritized, RichPlugin, SciJavaPlugin, Service
All Known Subinterfaces:
AppService, CommandService, ConsoleService, DragAndDropService, HandlerService<DT,PT>, IOService, OptionsService, PlatformService, ScriptService, SingletonService<PT>, TextService, ToolService, TypedService<DT,PT>, WidgetService, WrapperService<DT,PT>
All Known Implementing Classes:
AbstractHandlerService, AbstractPTService, AbstractSingletonService, AbstractTypedService, AbstractWrapperService, DefaultAppService, DefaultCommandService, DefaultConsoleService, DefaultDragAndDropService, DefaultIOService, DefaultOptionsService, DefaultPlatformService, DefaultScriptService, DefaultTextService, DefaultToolService, DefaultWidgetService

public interface PTService<PT extends SciJavaPlugin>
extends Service

A service for managing a particular sort of SciJavaPlugin.

There are many kinds of services, but most of them share one common characteristic: they provide API specific to a particular type of plugin. A few examples from ImageJ:

Most services fit this pattern in one way or another. When you wish to provide a new extensibility point, you create a new type of SciJavaPlugin, and a corresponding PTService for working with it. Depending on the nature of your new plugin type, this service might be:

It is named PTService rather than PluginTypeService or similar to avoid confusion with A) the PluginService itself, and B) any other service interface intended to define the API of a concrete service. In contrast to such services, the PTService is a more general layer in a type hierarchy intended to ease creation of services that fit its pattern.

Author:
Curtis Rueden
See Also:
SingletonService, TypedService, WrapperService

Method Summary
 List<PluginInfo<PT>> getPlugins()
          Gets the plugins managed by this service.
 PluginService getPluginService()
          Gets the service responsible for discovering and managing this service's plugins.
 Class<PT> getPluginType()
          Gets the type of plugins managed by this service.
 
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

getPluginService

PluginService getPluginService()
Gets the service responsible for discovering and managing this service's plugins.


getPlugins

List<PluginInfo<PT>> getPlugins()
Gets the plugins managed by this service.


getPluginType

Class<PT> getPluginType()
Gets the type of plugins managed by this service.



Copyright © 2009–2014 SciJava. All rights reserved.