org.clapper.curn
Class OutputHandlerFactory

java.lang.Object
  extended by org.clapper.curn.OutputHandlerFactory

public class OutputHandlerFactory
extends java.lang.Object

This class provides a factory for retrieving a specific OutputHandler implementation.

Version:
$Revision: 6447 $
See Also:
OutputHandler

Method Summary
static OutputHandler getOutputHandler(java.lang.Class<?> cls)
          Get an instance of the named OutputHandler class.
static OutputHandler getOutputHandler(java.lang.String className)
          Get an instance of the named OutputHandler class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getOutputHandler

public static OutputHandler getOutputHandler(java.lang.Class<?> cls)
                                      throws CurnException
Get an instance of the named OutputHandler class. This method loads the specified class, verifies that it conforms to the OutputHandler interface, instantiates it (via its default constructor), and returns the resulting OutputHandler object.

Parameters:
cls - the class for the output handler
Returns:
an OutputHandler object
Throws:
CurnException - Error instantiating class. The exception will contain the real underlying exception.

getOutputHandler

public static OutputHandler getOutputHandler(java.lang.String className)
                                      throws CurnException
Get an instance of the named OutputHandler class. This method loads the specified class, verifies that it conforms to the OutputHandler interface, instantiates it (via its default constructor), and returns the resulting OutputHandler object.

Parameters:
className - the class name
Returns:
an OutputHandler object
Throws:
CurnException - Error instantiating class. The exception will contain the real underlying exception.


Copyright © 2004-2006 Brian M. Clapper. All Rights Reserved.