org.scijava.plugin
Interface HandlerService<DT,PT extends HandlerPlugin<DT>>
- Type Parameters:
DT
- Base data type handled by the handlers.PT
- Plugin type of the handlers.
- All Superinterfaces:
- Comparable<Prioritized>, Contextual, Disposable, HasPluginInfo, Prioritized, PTService<PT>, RichPlugin, SciJavaPlugin, Service, SingletonService<PT>, Typed<DT>, TypedService<DT,PT>
- All Known Subinterfaces:
- ConsoleService, ConvertService, DragAndDropService, IOService, ScriptHeaderService, TextService
- All Known Implementing Classes:
- AbstractConvertService, AbstractHandlerService, DefaultConsoleService, DefaultConvertService, DefaultDragAndDropService, DefaultIOService, DefaultScriptHeaderService, DefaultTextService
public interface HandlerService<DT,PT extends HandlerPlugin<DT>>
- extends SingletonService<PT>, TypedService<DT,PT>
A service for managing HandlerPlugin
s of a particular type.
For any given data object, the service is capable of determining the most
appropriate handler by sequentially querying each handler plugin on its list
(via Typed.supports(T)
).
- Author:
- Curtis Rueden
- See Also:
HandlerPlugin
Method Summary |
PT |
getHandler(DT data)
Gets the most appropriate handler for the given data object, or null if no
handler supports it. |
List<PT> |
getInstances()
Gets the list of handlers. |
boolean |
supports(DT data)
Gets whether the given data object is supported. |
getHandler
PT getHandler(DT data)
- Gets the most appropriate handler for the given data object, or null if no
handler supports it.
getInstances
List<PT> getInstances()
- Gets the list of handlers. There will be one singleton instance for each
available handler plugin.
- Specified by:
getInstances
in interface SingletonService<PT extends HandlerPlugin<DT>>
supports
boolean supports(DT data)
- Gets whether the given data object is supported.
- Specified by:
supports
in interface Typed<DT>
Copyright © 2009–2015 SciJava. All rights reserved.