All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.jaw.impl.agent.services.persistent.PersistentPropertySrv

java.lang.Object
   |
   +----com.sun.jaw.impl.agent.services.persistent.PersistentPropertySrv

public class PersistentPropertySrv
extends Object
implements Serializable
This class provides a simple implementation of persistent m-bean properties.

The service analyzes an m-bean for information on all its read/write properties. The values of these properties are either extracted from the m-bean and saved in a text file (property file) or extracted from a property file and set in the m-bean. Non-null property values are saved in a property file using the following format: [Property name]=[Property value].

The properties of an m-bean must adhere to the following rules:

The following simple types are supported: NOTE: The service does not support simple or primitive array types.

See Also:
Properties, PropertyDescriptor, Introspector

Constructor Index

 o PersistentPropertySrv()
Default constructor.

Method Index

 o initCmf(Framework, ObjectName, boolean, ModificationList)
Initializes the persistent property service.
 o loadProperties(Object, String)
Loads and sets object properties from a property file.
 o performLoadProperties(ObjectName, String)
Loads and sets m-bean properties from a property file.
 o performSaveProperties(ObjectName, String)
Analyzes and saves m-bean properties to a property file.
 o saveProperties(Object, String)
Analyzes and saves object properties to a property file.

Constructors

 o PersistentPropertySrv
 public PersistentPropertySrv()
Default constructor.

Methods

 o performSaveProperties
 public void performSaveProperties(ObjectName name,
                                   String file) throws InstanceNotFoundException, IOException
Analyzes and saves m-bean properties to a property file.

Parameters:
name - The object name of the object to be analyzed for properties.
file - The property file to save the property values in.
Throws: InstanceNotFoundException
The specified m-bean does not exist in the m-bean repository.
Throws: IOException
Signals that an I/O exception of some sort has occurred.
 o performLoadProperties
 public void performLoadProperties(ObjectName name,
                                   String file) throws InstanceNotFoundException, IOException, FileNotFoundException
Loads and sets m-bean properties from a property file.

Parameters:
name - The object name of the object to be analyzed for properties.
file - The property file to load the property values from.
Throws: InstanceNotFoundException
The specified m-bean does not exist in the m-bean repository.
Throws: IOException
Signals that an I/O exception of some sort has occurred.
Throws: FileNotFoundException
Signals that a file could not be found.
 o saveProperties
 public void saveProperties(Object object,
                            String file) throws IOException
Analyzes and saves object properties to a property file.

Parameters:
object - The object to be analyzed for properties.
file - The property file to save the property values in.
Throws: IOException
Signals that an I/O exception of some sort has occurred.
 o loadProperties
 public void loadProperties(Object object,
                            String file) throws IOException, FileNotFoundException
Loads and sets object properties from a property file.

Parameters:
object - The object to be analyzed for properties.
file - The property file to load the property values from.
Throws: IOException
Signals that an I/O exception of some sort has occurred.
Throws: FileNotFoundException
Signals that a file could not be found.
 o initCmf
 public void initCmf(Framework cmf,
                     ObjectName name,
                     boolean db,
                     ModificationList list) throws InstanceAlreadyExistException
Initializes the persistent property service.
For internal use only.

Parameters:
cmf - The core management framework to register the service with.
name - Object name.
db - Indicates if persistent storage is required.
list - The modification list to use for setting up parameters.
Throws: InstanceAlreadyExistException
The m-bean is already registered in the repository.

All Packages  Class Hierarchy  This Package  Previous  Next  Index