    001package javax.visrec.spi;
    002
    003import javax.visrec.ImageFactory;
    004import java.util.Optional;
    005
    006/**
    007 * The service to locate and find implementations of the {@link ImageFactory} interface.
    008 *
    009 * @author Kevin Berendsen
    010 * @since 1.0
    011 */
    012public interface ImageFactoryService {
    013
    014    /**
    015     * Get the {@link ImageFactory} implementation by its image type.
    016     * @param imageCls image type in {@link Class} object which is able to
    017     *                 be processed by the image factory implementation.
    018     * @param <T> image type
    019     * @return {@link Optional} with possible {@link ImageFactory} implementation
    020     * if found.
    021     */
    022    <T> Optional<ImageFactory<T>> getByImageType(final Class<T> imageCls);
    023
    024}