mx4j.persist
Class FilePersister

java.lang.Object
  extended bymx4j.persist.Persister
      extended bymx4j.persist.FilePersister
All Implemented Interfaces:
PersisterMBean

public class FilePersister
extends Persister

A persister object that stores to files.

Version:
$Revision: 1.10 $

Constructor Summary
FilePersister(java.lang.String location, java.lang.String name)
          Creates a new FilePersister.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilePersister

public FilePersister(java.lang.String location,
                     java.lang.String name)
              throws javax.management.MBeanException
Creates a new FilePersister.

Parameters:
location - the directory where the file will be written (must already exist); if null the name is used as a location
name - the file name used to store information
Method Detail

getFileName

public java.lang.String getFileName()
Returns the path where the information is stored.


load

public java.lang.Object load()
                      throws javax.management.MBeanException,
                             javax.management.RuntimeOperationsException,
                             javax.management.InstanceNotFoundException
Description copied from interface: PersisterMBean
Loads the information persisted on the storage media.

Throws:
javax.management.MBeanException
javax.management.RuntimeOperationsException
javax.management.InstanceNotFoundException
See Also:
PersisterMBean.store(java.lang.Object)

store

public void store(java.lang.Object data)
           throws javax.management.MBeanException,
                  javax.management.RuntimeOperationsException,
                  javax.management.InstanceNotFoundException
Description copied from interface: PersisterMBean
Store the given information to the storage media.

Throws:
javax.management.MBeanException
javax.management.RuntimeOperationsException
javax.management.InstanceNotFoundException
See Also:
PersisterMBean.load()


Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.