org.norther.tammi.core.config
Class AbstractStreamConfigurator

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
All Implemented Interfaces:
Serializable, NotificationBroadcaster, NotificationEmitter, Manageable, MBeanDelegate, Configurator, StreamConfigurator
Direct Known Subclasses:
DefaultPropertyConfigurator, DefaultXMLConfigurator

public abstract class AbstractStreamConfigurator
extends DefaultConfigurator
implements StreamConfigurator

An abstract implementation of StreamConfigurator.

Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE
 
Constructor Summary
AbstractStreamConfigurator()
          Constructs a new configurator.
 
Method Summary
 void configure(ObjectName target, File file)
          Configures a registered MBean from a configuration file by applying the ISO-8859-1 encoding.
 void configure(ObjectName target, File file, String encoding)
          Configures a registered MBean from an encoded configuration file.
 void configure(ObjectName target, InputStream input)
          Configures a registered MBean from a configuration stream by applying the ISO-8859-1 encoding.
 void configure(ObjectName target, String path)
          Configures a registered MBean from a configuration file path by applying the ISO-8859-1 encoding.
 void configure(ObjectName target, String path, String encoding)
          Configures a registered MBean from an encoded configuration file path.
 void configure(ObjectName target, URL url)
          Configures a registered MBean from a configuration URL by applying the ISO-8859-1 encoding.
 void configure(ObjectName target, URL url, String encoding)
          Configures a registered MBean from an encoded configuration URL.
 String getConfigKey()
          Gets the path finder key for resolving configuration paths.
 void setConfigKey(String key)
          Sets the path finder key for resolving configuration paths.
 
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
 
Methods inherited from interface org.norther.tammi.core.config.Configurator
configure, configure
 

Constructor Detail

AbstractStreamConfigurator

public AbstractStreamConfigurator()
Constructs a new configurator.

Method Detail

getConfigKey

public String getConfigKey()
Description copied from interface: StreamConfigurator
Gets the path finder key for resolving configuration paths.

Specified by:
getConfigKey in interface StreamConfigurator
Returns:
the path finder key.

setConfigKey

public void setConfigKey(String key)
Description copied from interface: StreamConfigurator
Sets the path finder key for resolving configuration paths. The default key is PathFinderMBean.CONFIG.

Specified by:
setConfigKey in interface StreamConfigurator
Parameters:
key - the path finder key.

configure

public void configure(ObjectName target,
                      String path)
               throws ConfigurationException
Description copied from interface: StreamConfigurator
Configures a registered MBean from a configuration file path by applying the ISO-8859-1 encoding.

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

configure

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

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

configure

public void configure(ObjectName target,
                      File file)
               throws ConfigurationException
Description copied from interface: StreamConfigurator
Configures a registered MBean from a configuration file by applying the ISO-8859-1 encoding.

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

configure

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

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

configure

public void configure(ObjectName target,
                      URL url)
               throws ConfigurationException
Description copied from interface: StreamConfigurator
Configures a registered MBean from a configuration URL by applying the ISO-8859-1 encoding.

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

configure

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

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

configure

public void configure(ObjectName target,
                      InputStream input)
               throws ConfigurationException
Description copied from interface: StreamConfigurator
Configures a registered MBean from a configuration stream by applying the ISO-8859-1 encoding.

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


Copyright © 2004 The Norther Organization. All rights reserved.