public class FilePersister extends Persister
Constructor and Description |
---|
FilePersister(java.lang.String location,
java.lang.String name)
Creates a new FilePersister.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFileName()
Returns the path where the information is stored.
|
java.lang.Object |
load()
Loads the information persisted on the storage media.
|
void |
store(java.lang.Object data)
Store the given information to the storage media.
|
public FilePersister(java.lang.String location, java.lang.String name) throws javax.management.MBeanException
location
- the directory where the file will be written (must already exist);
if null the name is used as a locationname
- the file name used to store informationjavax.management.MBeanException
public java.lang.String getFileName()
public java.lang.Object load() throws javax.management.MBeanException, javax.management.RuntimeOperationsException, javax.management.InstanceNotFoundException
PersisterMBean
javax.management.MBeanException
javax.management.RuntimeOperationsException
javax.management.InstanceNotFoundException
PersisterMBean.store(java.lang.Object)
public void store(java.lang.Object data) throws javax.management.MBeanException, javax.management.RuntimeOperationsException, javax.management.InstanceNotFoundException
PersisterMBean
javax.management.MBeanException
javax.management.RuntimeOperationsException
javax.management.InstanceNotFoundException
PersisterMBean.load()