|
||||||||||
PREV CLASS (src) NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.persistence.ObjectStreamPersistenceManager
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.
Field Summary | |
protected boolean |
isLoading
A flag set to true to prevent attribute updates from within load triggering stores. |
protected static Logger (src) |
log
|
Constructor Summary | |
ObjectStreamPersistenceManager()
|
Method Summary | |
protected java.io.File |
getStoreFile(MBeanInfo (src) metadata,
boolean createFile)
|
protected boolean |
isLoading()
|
void |
load(ModelMBeanInvoker (src) mbean,
MBeanInfo (src) metadata)
deserializes state from the object input stream |
protected void |
loadFromMetadata(ModelMBeanInvoker (src) mbean,
ModelMBeanInfo (src) metadata)
Obtain the attribute values from the metadata and invoke setAttributes on the mbean invoker. |
protected void |
setIsLoading(boolean newIsLoading)
|
void |
store(MBeanInfo (src) metadata)
What we need to get here is 1) the persist location, and 2) the entire contents of the mbean. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static Logger (src) log
protected boolean isLoading
Constructor Detail |
public ObjectStreamPersistenceManager()
Method Detail |
public void load(ModelMBeanInvoker (src) mbean, MBeanInfo (src) metadata) throws MBeanException (src)
load
in interface PersistenceManager (src)
mbean
- metadata
-
MBeanException (src)
public void store(MBeanInfo (src) metadata) throws MBeanException (src)
store
in interface PersistenceManager (src)
metadata
-
MBeanException (src)
protected void loadFromMetadata(ModelMBeanInvoker (src) mbean, ModelMBeanInfo (src) metadata)
mbean
- the invoker and assocaited mbean resourcemetadata
- the metadata to use as the attributes value sourceprotected boolean isLoading()
protected void setIsLoading(boolean newIsLoading)
protected java.io.File getStoreFile(MBeanInfo (src) metadata, boolean createFile) throws MBeanException (src)
MBeanException (src)
|
||||||||||
PREV CLASS (src) NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |