Package is.galia.source


package is.galia.source

Package for sources, which locate and provide uniform access to source images.

A source translates an identifier to an image locator, such as a pathname, in the particular type of underlying storage it is written to interface with. It can then check whether the underlying image object exists and is accessible, and if so, provide access to it to other application components. The rest of of the application does not need to know where an image resides, or how to access it natively—it can simply ask the source it has access to.

Writing Custom Sources

Sources must implement Source. Inheriting from AbstractSource will get you a couple of free method implementations.

Custom sources are auto-detected using ServiceLoader. Their JAR must include a file named Source inside resources/META-INF/services containing the fully qualified class name of the implementation. Also, any references to the implementation from the configuration file or delegate must use the fully qualified class name.