Changes between Version 1 and Version 2 of BioFormatsService


Ignore:
Timestamp:
02/25/10 10:13:48 (10 years ago)
Author:
callan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BioFormatsService

    v1 v2  
    2929}}} 
    3030 
    31  * '''Implementation''' -- This service then has an implementation, which is usually located in the Bio-Formats component or package which imports classes from an external, dynamic or other dependency. By convention this class is expected to be in a package named {{{loci.*.services}}}}. Again looking at the {{{OMENotesService}}}, the implementation is this time in the legacy ome-notes component as [source:/branches/cleanup/components/legacy/ome-notes/src/loci/ome/notes/services/OMENotesServiceImpl.java OMENotesServiceImpl]: 
     31 * '''Implementation''' -- This service then has an implementation, which is usually located in the Bio-Formats component or package which imports classes from an external, dynamic or other dependency. Again looking at the {{{OMENotesService}}}, the implementation is this time in the legacy ome-notes component as [source:/branches/cleanup/components/legacy/ome-notes/src/loci/ome/notes/services/OMENotesServiceImpl.java OMENotesServiceImpl]: 
    3232    {{{ 
    3333public class OMENotesServiceImpl extends AbstractService 
     
    5353    * Extension of {{{AbstractService}}} to enable uniform runtime dependency checking is recommended. Java does not check class dependencies until classes are first instantiated so if you do not do this, you may end up with {{{ClassNotFound}}} or the like exceptions being emitted from your service methods. This is to be '''strongly''' discouraged. If a service has unresolvable classes on its CLASSPATH instantiation should fail, not service method invocation. 
    5454    * Service methods should not burden the implementer with numerous checked exceptions. Also external dependency exception instances should not be allowed to directly leak from a service interface. Please wrap these using a {{{ServiceException}}}. 
     55    * By convention both the interface and implementation are expected to be in a package named {{{loci.*.services}}}. This is not a hard requirement but should be followed where possible. 
    5556 
    5657 * '''Registration''' -- A service's interface and implementation must finally be ''registered'' with the [source:/branches/cleanup/components/common/loci/common/services/ServiceFactory.java loci.common.services.ServiceFactory] via the [source:/branches/cleanup/components/common/loci/common/services/Service.java services.properties] file. Following the {{{OMENotesService}}} again, here is an example registration: