Task #10542 (closed)
Convert codecs to scijava plugins
|Reported by:||mhiner-x||Owned by:||mhiner-x|
|Keywords:||n.a.||Cc:||jamoore, mlinkert, crueden-x|
All the codecs in loci.formats.codec will be converted to use the scijava-common context for service managing. Since this will cause them to be contextual, each codec should extend SortablePlugin? and be properly annotated.
This will replace the current ServiceFactory implementation, allowing for consolidation of service loading and should reduce potentially unnecessary dependency/class loading checks. The context has error handling surrounding service loading and instantiation, so if a requested service fails to initialize or is not present, it will simply be null when requested (and the error output logged appropriately).
Stubs for the services themselves likely still need to be present for compile-time safety. But they should perhaps be flagged as "Provided" in the Maven pom, as they should no longer be necessary at run-time.
This will also obviate the need for class dependency checks in the service implementations, because of the context-level error handling and reporting.
Note that this will cause services to be loaded on context initialization, instead of lazily by the codec.