org.apache.ojb.broker.util.configuration
Interface Configurator

All Known Implementing Classes:
OjbConfigurator

public interface Configurator

The Configurator interface defines methods for looking up Configurations and for configuring Configurable instances. call sequence: 1. The application obtains a Configurator instance (typically from a Factory). 2. The application uses the Configurator to configure Configurable instances. The Configurator must lookup the proper Configuration and invoke the configure method on the Configurable instance.

      // 1. obtain Configurator
      Configurator configurator = OjbConfigurator.getInstance();
 
      // 2. ask Configurator to configure the Configurable instance
      Configurable obj = ...
      configurator.configure(obj);
 

Version:
$Id: Configurator.java,v 1.3 2002/06/28 22:36:47 thma Exp $
Author:
Thomas Mahler

Method Summary
 void configure(Configurable target)
          configures the Configurable instance target.
 Configuration getConfigurationFor(Configurable target)
          looks up the proper Configuration for the Configurable instance target.
 void setLogger(Logger loggerInstance)
          this method allows to set a logger that tracks configuration events.
 

Method Detail

setLogger

public void setLogger(Logger loggerInstance)
this method allows to set a logger that tracks configuration events.

Parameters:
loggerInstance - the logger to set

configure

public void configure(Configurable target)
               throws ConfigurationException
configures the Configurable instance target.

Parameters:
target - the Configurable instance.
Throws:
ConfigurationException

getConfigurationFor

public Configuration getConfigurationFor(Configurable target)
                                  throws ConfigurationException
looks up the proper Configuration for the Configurable instance target.

Parameters:
target - the Configurable instance.
Returns:
the resultingConfiguration.
Throws:
ConfigurationException


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14