org.scijava.plugin
Interface WrapperService<DT,PT extends WrapperPlugin<DT>>

Type Parameters:
DT - Base data type
PT - Plugin type
All Superinterfaces:
Comparable<Prioritized>, Contextual, Disposable, HasPluginInfo, Prioritized, PTService<PT>, RichPlugin, SciJavaPlugin, Service, Typed<DT>, TypedService<DT,PT>
All Known Implementing Classes:
AbstractWrapperService

public interface WrapperService<DT,PT extends WrapperPlugin<DT>>
extends TypedService<DT,PT>

A service for managing WrapperPlugins of a particular type. A WrapperPlugin is a stateful TypedPlugin which wraps a particular object of its associated data type. For any given data object, the service is capable of wrapping it with the most appropriate wrapper by sequentially querying each WrapperPlugin on its list for compatibility.

Note that like PTService, SingletonService and TypedService, WrapperService 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:
WrapperPlugin, PTService

Method Summary
<D extends DT>
WrapperPlugin<D>
create(D data)
          Creates a new plugin instance wrapping the given associated data object.
 
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, supports
 

Method Detail

create

<D extends DT> WrapperPlugin<D> create(D data)
Creates a new plugin instance wrapping the given associated data object.

Throws:
IllegalArgumentException - if the data is not compatible with any available plugin.


Copyright © 2009–2014 SciJava. All rights reserved.