de.dante.extex.interpreter.context
Class ContextFactory

java.lang.Object
  extended byde.dante.util.framework.AbstractFactory
      extended byde.dante.extex.interpreter.context.ContextFactory
All Implemented Interfaces:
Configurable, LogEnabled, RegistrarObserver

public class ContextFactory
extends AbstractFactory

This class provides a factory for a Context.

  <Context class="the.package.TheClass">
  </Context>
 

Version:
$Revision: 1.14 $
Author:
Gerd Neugebauer

Constructor Summary
ContextFactory(Configuration configuration, java.util.logging.Logger logger)
          Creates a new object.
 
Method Summary
 Context newInstance(java.lang.String type)
          Get an instance of a context.
 
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

ContextFactory

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

Parameters:
configuration - the configuration for this factory
logger - the logger
Throws:
ConfigurationException - in case of an error in the configuration.
Method Detail

newInstance

public Context newInstance(java.lang.String type)
                    throws ConfigurationException
Get an instance of a context. This method selects one of the entries in the configuration. The selection is done with the help of a type String. If the type is null or the empty string then the default from the configuration is used.

Parameters:
type - the type to use
Returns:
a new context
Throws:
ConfigurationException - in case of an configuration error