mx4j.persist

Class FilePersister

Implemented Interfaces:
PersisterMBean

public class FilePersister
extends Persister

A persister object that stores to files.
Version:
$Revision: 1.10 $

Constructor Summary

FilePersister(String location, String name)
Creates a new FilePersister.

Method Summary

String
getFileName()
Returns the path where the information is stored.
Object
load()
Loads the information persisted on the storage media.
void
store(Object data)
Store the given information to the storage media.

Constructor Details

FilePersister

public FilePersister(String location,
                     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 Details

getFileName

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

load

public Object load()
            throws javax.management.MBeanException,
                   javax.management.RuntimeOperationsException,
                   javax.management.InstanceNotFoundException
Loads the information persisted on the storage media.
Specified by:
load in interface PersisterMBean

store

public void store(Object data)
            throws javax.management.MBeanException,
                   javax.management.RuntimeOperationsException,
                   javax.management.InstanceNotFoundException
Store the given information to the storage media.
Specified by:
store in interface PersisterMBean

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