|
xmlgraphics-commons 1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.xmlgraphics.image.loader.pipeline.ImageProviderPipeline
public class ImageProviderPipeline
Represents a pipeline of ImageConverters with an ImageLoader at the beginning of the pipeline.
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
logger |
Constructor Summary | |
---|---|
ImageProviderPipeline()
Default constructor without caching and without an ImageLoader (or the ImageLoader may be set later). |
|
ImageProviderPipeline(ImageCache cache,
ImageLoader loader)
Main constructor. |
|
ImageProviderPipeline(ImageLoader loader)
Constructor for operation without caching. |
Method Summary | |
---|---|
void |
addConverter(ImageConverter converter)
Adds an additional ImageConverter to the end of the pipeline. |
Image |
execute(ImageInfo info,
Image originalImage,
java.util.Map hints,
ImageSessionContext context)
Executes the image converter pipeline. |
Image |
execute(ImageInfo info,
java.util.Map hints,
ImageSessionContext context)
Executes the image converter pipeline. |
protected Image |
forceCaching(Image img)
In some cases the provided Image is not cacheable, nor is any of the intermediate Image instances (for example, when loading a raw JPEG file). |
int |
getConversionPenalty()
Returns the overall conversion penalty for the pipeline. |
ImageFlavor |
getTargetFlavor()
Returns the target flavor generated by this pipeline. |
void |
setImageLoader(ImageLoader imageLoader)
Sets the ImageLoader that is used at the beginning of the pipeline if the image is not loaded, yet. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
Constructor Detail |
---|
public ImageProviderPipeline(ImageCache cache, ImageLoader loader)
cache
- the image cache (may be null if no caching is desired)loader
- the image loader to drive the pipeline withpublic ImageProviderPipeline(ImageLoader loader)
loader
- the image loader to drive the pipeline withpublic ImageProviderPipeline()
Method Detail |
---|
public Image execute(ImageInfo info, java.util.Map hints, ImageSessionContext context) throws ImageException, java.io.IOException
info
- the image info object indicating the image to loadhints
- a Map of image conversion hintscontext
- the session context
ImageException
- if an error occurs while loader or converting the image
java.io.IOException
- if an I/O error occurspublic Image execute(ImageInfo info, Image originalImage, java.util.Map hints, ImageSessionContext context) throws ImageException, java.io.IOException
info
- the image info object indicating the image to loadoriginalImage
- the original image to start the pipeline off or null if an ImageLoader
is usedhints
- a Map of image conversion hintscontext
- the session context
ImageException
- if an error occurs while loader or converting the image
java.io.IOException
- if an I/O error occursprotected Image forceCaching(Image img) throws java.io.IOException
img
- the Image to investigate
java.io.IOException
- if an I/O error occurspublic void setImageLoader(ImageLoader imageLoader)
imageLoader
- the image loader implementationpublic void addConverter(ImageConverter converter)
converter
- the ImageConverter instancepublic java.lang.String toString()
toString
in class java.lang.Object
public int getConversionPenalty()
public ImageFlavor getTargetFlavor()
|
xmlgraphics-commons 1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |