org.jmage.encoder
Class EncoderManager

java.lang.Object
  extended by org.jmage.encoder.EncoderManager
All Implemented Interfaces:
Configurable, RequestHandler

public class EncoderManager
extends java.lang.Object
implements RequestHandler

Manages ImageEncoders.


Field Summary
protected  java.util.List imageEncoders
           
protected static org.apache.log4j.Logger log
           
 
Constructor Summary
protected EncoderManager()
           
  EncoderManager(java.util.List imageEncoders)
          Creates a EncoderManager for an array of given ImageEncoders
 
Method Summary
 boolean canHandle(ImageRequest request)
          Test whether the ImageEncoder can handle the format
 void configure(ApplicationContext context)
          Configure encoder properties
 void handle(ImageRequest request)
          Encodes a JAI PlanarImage into a specific format
 void initialize(ImageRequest request)
          Initialize the ImageEncoder for a particular encodingformat using Properties
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

imageEncoders

protected java.util.List imageEncoders

log

protected static org.apache.log4j.Logger log
Constructor Detail

EncoderManager

protected EncoderManager()

EncoderManager

public EncoderManager(java.util.List imageEncoders)
Creates a EncoderManager for an array of given ImageEncoders

Parameters:
imageEncoders -
Method Detail

configure

public void configure(ApplicationContext context)
Configure encoder properties

Specified by:
configure in interface Configurable
Parameters:
context -

handle

public void handle(ImageRequest request)
            throws JmageException
Encodes a JAI PlanarImage into a specific format

Specified by:
handle in interface RequestHandler
Parameters:
request - the ImageRequest
Throws:
JmageException - if the image couldn't be encoded or the format isn't supported.

canHandle

public boolean canHandle(ImageRequest request)
Test whether the ImageEncoder can handle the format

Parameters:
request - ImageRequest
Returns:
[true | false]

initialize

public void initialize(ImageRequest request)
                throws CodecException
Initialize the ImageEncoder for a particular encodingformat using Properties

Parameters:
request -
Throws:
CodecException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2004-2008 Sourceforge. All Rights Reserved.