1 package org.jmage.resource; 2 3 import org.jmage.RequestHandler; 4 import org.jmage.ImageRequest; 5 import org.jmage.JmageException; 6 7 import java.net.URI; 8 9 /*** 10 * ResourceManager 11 */ 12 public interface ResourceManager extends RequestHandler { 13 14 /*** 15 * Creates a resource object to use from a given ImageRequest. This will be in all cases an instance of PlanarImage, 16 * however Object is used as the return type for the cacheInterceptor to work. 17 * 18 * @param request 19 * @return the local resource object. 20 * @throws org.jmage.resource.ResourceException 21 * if the resource could not be found, or not be handled by any of 22 * the configured ResourceFactory objects. 23 */ 24 Object createFrom(ImageRequest request) throws JmageException; 25 26 /*** 27 * Creates a resource object to use from a given URI. 28 * 29 * @param resourceURI 30 * @return the local resource object. 31 * @throws org.jmage.resource.ResourceException 32 * if the resource could not be found, or not be handled by any of 33 * the configured ResourceFactory objects. 34 */ 35 Object createFrom(URI resourceURI) throws JmageException; 36 }