org.apache.fop.image

Interface ImageCache

public interface ImageCache

Image cache holder. This interface is used for caching images.

Method Summary

void
clearAll()
Forces the cache to fully cleared.
FopImage
getImage(String url, FOUserAgent context)
Get an image from the cache.
void
invalidateImage(String url, FOUserAgent context)
Invalidate image.
void
releaseImage(String url, FOUserAgent context)
Release an image in the current context.
void
removeContext(FOUserAgent context)
Remove a context and handle all images in the context.

Method Details

clearAll

public void clearAll()
Forces the cache to fully cleared.

getImage

public FopImage getImage(String url,
                         FOUserAgent context)
Get an image from the cache.
Parameters:
url - the url and key for the image
context - the user agent context
Returns:
the requested image

invalidateImage

public void invalidateImage(String url,
                            FOUserAgent context)
Invalidate image. If during loading this image is found to be invalid it will be invalidated to prevent further attempts at loading the image.
Parameters:
url - the url and key for the image
context - the user agent context

releaseImage

public void releaseImage(String url,
                         FOUserAgent context)
Release an image in the current context.
Parameters:
url - the url and key for the image
context - the user agent context

removeContext

public void removeContext(FOUserAgent context)
Remove a context and handle all images in the context.
Parameters:
context - the user agent context

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.