|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
PT - Plugin type of the plugins being managed.public interface PTService<PT extends SciJavaPlugin>
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:
CommandService works with
Commands.TextService works with
TextFormats.PlatformService works with
Platforms.
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:
SingletonService, such as
PlatformService, which manages
SingletonPlugins.HandlerService, such as TextService,
which manages HandlerPlugins.WrapperService, such as
WidgetService, which manages
WrapperPlugins.
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.
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 |
|---|
PluginService getPluginService()
List<PluginInfo<PT>> getPlugins()
Class<PT> getPluginType()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||