org.norther.tammi.core.config
Interface Configurator

All Known Subinterfaces:
PropertyConfigurator, StreamConfigurator, XMLConfigurator
All Known Implementing Classes:
AbstractStreamConfigurator, DefaultConfigurator, DefaultPropertyConfigurator, DefaultXMLConfigurator

public interface Configurator

An interface to configurators defining properties of objects through their exposed attributes and methods.

The names of properties are defined either directly as attribute names or by separating words with dots. E.g. the call

 setDefaultContentType("text/html");
 
can be presented with the following two syntaxes:
 DefaultContentType: text/html
 default.content.type: text/html
 
Note that in the latter syntax the first letter is of separate words is automatically converted to uppercase.

The attribute name can have a prefix, which is given as a separate parameter to a tagged property setter. E.g. the call

 setUserAgentPattern("Mozilla", "Mozilla");
 
can be presented with the following two syntaxes:
 Mozilla.UserAgentPattern: Mozilla
 Mozilla.user.agent.pattern: Mozilla
 

Author:
Ilkka Priha

Method Summary
 void configure(ObjectName target, Configuration config)
          Configures a registered MBean from a configuration.
 void configure(ObjectName target, Properties props)
          Configures a registered MBean from properties.
 

Method Detail

configure

void configure(ObjectName target,
               Properties props)
               throws ConfigurationException
Configures a registered MBean from properties.

Parameters:
target - the object name of the MBean.
props - the properties.
Throws:
ConfigurationException - on configuration errors.

configure

void configure(ObjectName target,
               Configuration config)
               throws ConfigurationException
Configures a registered MBean from a configuration.

Parameters:
target - the object name of the MBean.
config - the configuration.
Throws:
ConfigurationException - on configuration errors.


Copyright © 2004 The Norther Organization. All rights reserved.