uk.org.iscream.cms.server.core
Class ConfigurationServant

java.lang.Object
  |
  +--org.omg.PortableServer.Servant
        |
        +--uk.org.iscream.cms.server.core.ConfigurationPOA
              |
              +--uk.org.iscream.cms.server.core.ConfigurationServant
All Implemented Interfaces:
ConfigurationOperations, InvokeHandler

class ConfigurationServant
extends ConfigurationPOA

An implementation of the Configuration IDL This class allows i-scream modules to read and even set their configuration from a central location. When classes want their configuration, they contact the ConfigurationManager, which will locate their config, open it and pass it to a Configuration object which is then passed back to the calling class. Essentially this class behaves in a similar fashion to the java.util.Properties class.

Version:
$Id: ConfigurationServant.java,v 1.23 2003/02/05 16:43:47 tdb Exp $
Author:
$Author: tdb $

Field Summary
private  String _fileList
          The list of files that were used to build this configuration
private  long _lastModified
          The date stamp of the configuration file this object is using
private  Logger _logger
          This holds a reference to the system logger that is being used.
private  String _name
          This is the friendly identifier of the component this class is running in.
private  Properties _properties
          The properties object that this class provides a CORBA interface to
private  ReferenceManager _refman
          A reference to the reference manager in use
 String REVISION
          The current CVS revision of this class
 
Fields inherited from class uk.org.iscream.cms.server.core.ConfigurationPOA
 
Fields inherited from class org.omg.PortableServer.Servant
 
Constructor Summary
(package private) ConfigurationServant(Properties properties, String fileList, long lastModified)
          Creates a new ConfigurationServant taking a hook to a Properties object containing the configuration.
 
Method Summary
 void disconnect()
          Unhooks this Configuration object from the ORB
protected  void finalize()
          Overridden for debugging purposes to see when an instance of this class is destroyed
 String getFileList()
          Returns the list of files used to build the Properties this object is using.
 long getLastModified()
          Returns the date stamp of the configuration file this object is using.
 String getProperty(String key)
          A wrapper for java.util.Properties.getProperty When given a key it returns the value of that key ie, key = value
 String toString()
          Overrides the Object.toString() method to provide clean logging (every class should have this).
 
Methods inherited from class uk.org.iscream.cms.server.core.ConfigurationPOA
_all_interfaces, _invoke, _this, _this
 
Methods inherited from class org.omg.PortableServer.Servant
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public final String REVISION
The current CVS revision of this class

See Also:
Constant Field Values

_properties

private Properties _properties
The properties object that this class provides a CORBA interface to


_logger

private Logger _logger
This holds a reference to the system logger that is being used.


_refman

private ReferenceManager _refman
A reference to the reference manager in use


_name

private String _name
This is the friendly identifier of the component this class is running in. eg, a Filter may be called "filter1", If this class does not have an owning component, a name from the configuration can be placed here. This name could also be changed to null for utility classes.


_lastModified

private long _lastModified
The date stamp of the configuration file this object is using


_fileList

private String _fileList
The list of files that were used to build this configuration

Constructor Detail

ConfigurationServant

ConfigurationServant(Properties properties,
                     String fileList,
                     long lastModified)
Creates a new ConfigurationServant taking a hook to a Properties object containing the configuration.

Parameters:
properties - a Properties object that contains the full properties for this configuration
fileList - the list of config files used to build this configuration
lastModified - the most recent last modified value for the file list
Method Detail

getProperty

public String getProperty(String key)
A wrapper for java.util.Properties.getProperty When given a key it returns the value of that key ie, key = value

Parameters:
key - the key the value of which is wanted

toString

public String toString()
Overrides the Object.toString() method to provide clean logging (every class should have this). This uses the uk.org.iscream.cms.util.FormatName class to format the toString()

Overrides:
toString in class Object
Returns:
the name of this class and its CVS revision

disconnect

public void disconnect()
Unhooks this Configuration object from the ORB


finalize

protected void finalize()
                 throws Throwable
Overridden for debugging purposes to see when an instance of this class is destroyed

Overrides:
finalize in class Object
Throwable

getLastModified

public long getLastModified()
Returns the date stamp of the configuration file this object is using.

Returns:
the last modified time for the file

getFileList

public String getFileList()
Returns the list of files used to build the Properties this object is using.

Returns:
the list of files


Copyright © 2000-2003 i-scream. All Rights Reserved.