| java.lang.Object org.jboss.test.jmx.xmbean.XMLFilePersistenceManager
XMLFilePersistenceManager | public class XMLFilePersistenceManager extends Object implements PersistenceManager(Code) | | XML File Persistence Manager.
Persists the MBean to the file system using an XML file.
The file has to follow this (simple) DTD:
author: Heiko.Rupp@cellent.de author: Dimitris Andreadis. version: $Revision: 57211 $ |
Field Summary | |
protected boolean | isLoading A flag set to true to prevent attribute updates from within load
triggering stores. | protected static Logger | log |
Method Summary | |
protected File | getStoreFile(MBeanInfo metadata, boolean createFile) Obtain the store location from the ModelMBean Descriptor. | protected boolean | isLoading() | public void | load(ModelMBeanInvoker mbean, MBeanInfo metadata) | protected void | setIsLoading(boolean newIsLoading) | public void | store(MBeanInfo metadata) What we need to get here is 1) the persist location, and 2) the entire
contents of the mbean. |
isLoading | protected boolean isLoading(Code) | | A flag set to true to prevent attribute updates from within load
triggering stores.
|
log | protected static Logger log(Code) | | |
XMLFilePersistenceManager | public XMLFilePersistenceManager()(Code) | | |
getStoreFile | protected File getStoreFile(MBeanInfo metadata, boolean createFile) throws MBeanException(Code) | | Obtain the store location from the ModelMBean Descriptor.
If the file name does not end on ".xml", it will be converted
to do so.
Parameters: metadata - Parameters: createFile - throws: MBeanException - |
isLoading | protected boolean isLoading()(Code) | | |
load | public void load(ModelMBeanInvoker mbean, MBeanInfo metadata) throws MBeanException(Code) | | Loads the attributes from the given file
Parameters: mbean - to store to Parameters: metadata - with file location etc. exception: MBeanException - |
setIsLoading | protected void setIsLoading(boolean newIsLoading)(Code) | | |
store | public void store(MBeanInfo metadata) throws MBeanException(Code) | | What we need to get here is 1) the persist location, and 2) the entire
contents of the mbean. #2 contains the entire contents (state) of the
model object, as well as the meta data that the mbean provides.
As such, serializing this (MBeanInfo) object (brute force) in effect
serializes the model as well.
Parameters: metadata - exception: MBeanException - |
|
|