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:
- must be a read and write property.
- must be a not hidden property.
- must be of type simple or primitive.
The following simple types are supported:
- Boolean
- Byte
- Character
- Double
- Float
- Integer
- Long
- Short
- String
NOTE: The service does not support simple or primitive array types.
- See Also:
- Properties, PropertyDescriptor, Introspector
-
PersistentPropertySrv()
- Default constructor.
-
initCmf(Framework, ObjectName, boolean, ModificationList)
- Initializes the persistent property service.
-
loadProperties(Object, String)
- Loads and sets object properties from a property file.
-
performLoadProperties(ObjectName, String)
- Loads and sets m-bean properties from a property file.
-
performSaveProperties(ObjectName, String)
- Analyzes and saves m-bean properties to a property file.
-
saveProperties(Object, String)
- Analyzes and saves object properties to a property file.
PersistentPropertySrv
public PersistentPropertySrv()
- Default constructor.
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.
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.
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.
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.
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