de.dante.extex.backend
Class BackendFactory

java.lang.Object
  extended byde.dante.util.framework.AbstractFactory
      extended byde.dante.extex.backend.BackendFactory
All Implemented Interfaces:
Configurable, LogEnabled, RegistrarObserver

public class BackendFactory
extends AbstractFactory

This class provides a factory for the back-end.

The class to be instantiated can implements one or more interfaces which trigger special actions:

Configurable
If this interface is implemented then a Configuration is passed in with the interface method.
LogEnabled
If this interface is implemented then a Logger is passed in with the interface method.
Localizable
If this interface is implemented then a Localizer is passed in with the interface method.
ResourceConsumer
If this interface is implemented then a ResourceFinder is passed in with the interface method.
PropertyConfigurable
If this interface is implemented then a Properties instance is passed in with the interface method.
ColorAware
If this interface is implemented then a ColorConverter instance is passed in with the interface method.

Version:
$Revision: 1.4 $
Author:
Gerd Neugebauer

Constructor Summary
BackendFactory(Configuration config, java.util.logging.Logger logger)
          Creates a new object.
 
Method Summary
 BackendDriver newInstance(java.lang.String type, DocumentWriterOptions options, OutputStreamFactory outFactory, ResourceFinder finder, java.util.Properties properties, java.lang.String creator, FontFactory fontFactory, ColorConverter colorConverter)
          Acquire an instance of a back-end driver.
 
Methods inherited from class de.dante.util.framework.AbstractFactory
configure, configure, createInstance, createInstance, createInstance, createInstanceForConfiguration, createInstanceForConfiguration, createInstanceForConfiguration, enableLogging, enableLogging, getConfiguration, getLogger, reconnect, selectConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackendFactory

public BackendFactory(Configuration config,
                      java.util.logging.Logger logger)
               throws ConfigurationException
Creates a new object.

Parameters:
config - the configuration
logger - the logger
Throws:
ConfigurationException - in case of an configuration error
Method Detail

newInstance

public BackendDriver newInstance(java.lang.String type,
                                 DocumentWriterOptions options,
                                 OutputStreamFactory outFactory,
                                 ResourceFinder finder,
                                 java.util.Properties properties,
                                 java.lang.String creator,
                                 FontFactory fontFactory,
                                 ColorConverter colorConverter)
                          throws DocumentWriterException,
                                 ConfigurationException
Acquire an instance of a back-end driver.

Parameters:
type - the type of the document writer
options - the options
outFactory - the output stream factory
finder - the resource finder
properties - the properties
creator - the creator string
colorConverter - the color converter
Returns:
the new instance
Throws:
DocumentWriterException - in case of an error
ConfigurationException - in case of an error in the configuration