| java.lang.Object org.jboss.mx.persistence.ObjectStreamPersistenceManager
ObjectStreamPersistenceManager | public class ObjectStreamPersistenceManager extends Object implements PersistenceManager(Code) | | Object Stream Persistence Manager.
Persists the MBean to the file system using an Object Stream.
Includes code based on examples in Juha's JMX Book.
Object Streams written to disk are admittedly lacking in the area of
"long-term", "portable", or "human-readable" persistence. They are fairly
straightforward, however.
Primarily, this class is useful for demonstration and "quick & dirty" persistence.
author: Matt Munz author: Scott.Stark@jboss.org version: $Revision: 57200 $ |
Field Summary | |
protected boolean | isLoading A flag set to true to prevent attribute updates from within load
triggering stores. | protected static Logger | log |
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) | | |
ObjectStreamPersistenceManager | public ObjectStreamPersistenceManager()(Code) | | |
isLoading | protected boolean isLoading()(Code) | | |
loadFromMetadata | protected void loadFromMetadata(ModelMBeanInvoker mbean, ModelMBeanInfo metadata)(Code) | | Obtain the attribute values from the metadata and invoke setAttributes
on the mbean invoker.
Parameters: mbean - the invoker and assocaited mbean resource Parameters: metadata - the metadata to use as the attributes value source |
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 - |
|
|