org.norther.tammi.core.config
Class DefaultXMLConfigurator

java.lang.Object
  extended by org.norther.tammi.core.base.Adaptee
      extended by org.norther.tammi.core.config.DefaultConfigurator
          extended by org.norther.tammi.core.config.AbstractStreamConfigurator
              extended by org.norther.tammi.core.config.DefaultXMLConfigurator
All Implemented Interfaces:
Serializable, NotificationBroadcaster, NotificationEmitter, Manageable, MBeanDelegate, Configurator, StreamConfigurator, XMLConfigurator

public class DefaultXMLConfigurator
extends AbstractStreamConfigurator
implements XMLConfigurator

A default implementation of XMLConfigurator.

Version:
$Id: DefaultXMLConfigurator.java,v 1.7 2009/09/28 15:08:44 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Constructor Summary
DefaultXMLConfigurator()
          Constructs a new configurator.
 
Method Summary
 void configure(ObjectName target, InputStream input, String encoding)
          Configures a registered MBean from an encoded configuration stream.
 String getSeparator()
          Gets the default separator(s) of multivalued properties.
 void setSeparator(String separ)
          Sets the default separator(s) of multivalued properties.
 
Methods inherited from class org.norther.tammi.core.config.AbstractStreamConfigurator
configure, configure, configure, configure, configure, configure, configure, getConfigKey, setConfigKey
 
Methods inherited from class org.norther.tammi.core.config.DefaultConfigurator
configure, configure
 
Methods inherited from class org.norther.tammi.core.base.Adaptee
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, postmanaged, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unmanaged, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.norther.tammi.core.config.StreamConfigurator
configure, configure, configure, configure, configure, configure, configure, getConfigKey, setConfigKey
 
Methods inherited from interface org.norther.tammi.core.config.Configurator
configure, configure
 

Constructor Detail

DefaultXMLConfigurator

public DefaultXMLConfigurator()
Constructs a new configurator.

Method Detail

getSeparator

public String getSeparator()
Description copied from interface: XMLConfigurator
Gets the default separator(s) of multivalued properties.

Specified by:
getSeparator in interface XMLConfigurator
Returns:
the separator(s) or null.

setSeparator

public void setSeparator(String separ)
Description copied from interface: XMLConfigurator
Sets the default separator(s) of multivalued properties. Null disables multivalued properties, an empty string allows multiple values on separate lines (default) and other strings specify characters interpreted as separators between values.

It is recommended to control separators with the corresponding property in the property file itself.

Specified by:
setSeparator in interface XMLConfigurator
Parameters:
separ - the separator(s).

configure

public void configure(ObjectName target,
                      InputStream input,
                      String encoding)
               throws ConfigurationException
Description copied from interface: StreamConfigurator
Configures a registered MBean from an encoded configuration stream. If encoding is not given, the platform default is applied.

Specified by:
configure in interface StreamConfigurator
Parameters:
target - the object name of the MBean.
input - the configuration stream.
encoding - the encoding of the configuration.
Throws:
ConfigurationException - on configuration errors


Copyright © 2004 The Norther Organization. All rights reserved.