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 Implementing Classes:
AbstractHandlerService

public interface HandlerService<DT,PT extends HandlerPlugin<DT>>
extends SingletonService<PT>, TypedService<DT,PT>

A service for managing HandlerPlugins 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.
 
Methods inherited from interface org.scijava.plugin.SingletonService
getInstance
 
Methods inherited from interface org.scijava.plugin.PTService
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
 
Methods inherited from interface org.scijava.Typed
getType
 

Method Detail

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–2014 SciJava. All rights reserved.