ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able
Interface AbleSerializable

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
AbleAgent, AbleBean, AbleDataSink, AbleDataSource

public interface AbleSerializable
extends java.io.Serializable

The AbleSerializable interface provides the methods needed to save and restore serializable ABLE beans using a file path and name provided by the implementor.


Method Summary
 java.lang.String getFileName()
          Returns the persistent store file name.
 AbleBean restoreFromFile()
          Read a serialized bean from the file named previously by the setFileName() method, or from the default name provided by the implementor.
 AbleBean restoreFromFile(java.lang.String theFileName)
          Read a serialized bean from the specified file.
 void saveToFile()
          Write a serialized version of this bean to the file named previously by the setFileName(java.lang.String) method, or to the default name provided by the implementor.
 void saveToFile(java.lang.String theFileName)
          Write a serialized version of this bean to the specified file.
 void setFileName(java.lang.String theFileName)
          Sets or changes the persistent store file name.
 

Method Detail

setFileName

public void setFileName(java.lang.String theFileName)
Sets or changes the persistent store file name.
Parameters:
theFileName - The new name of the file to which this bean can be serialized or from which the bean can be de-serialized. This file name replaces the current file name.

getFileName

public java.lang.String getFileName()
Returns the persistent store file name.
Returns:
A String containing the current name of the file to which this bean is to be serialized or from which the bean can be de-serialized.

saveToFile

public void saveToFile()
                throws java.io.IOException
Write a serialized version of this bean to the file named previously by the setFileName(java.lang.String) method, or to the default name provided by the implementor.
Throws:
java.io.IOException - If any error occurs.

saveToFile

public void saveToFile(java.lang.String theFileName)
                throws java.io.IOException
Write a serialized version of this bean to the specified file.
Parameters:
theFileName - The name of the file to write.
Throws:
java.io.IOException - If any error occurs.

restoreFromFile

public AbleBean restoreFromFile()
                         throws java.lang.ClassNotFoundException,
                                java.io.IOException
Read a serialized bean from the file named previously by the setFileName() method, or from the default name provided by the implementor.
Returns:
The de-serialized bean.
Throws:
java.lang.ClassNotFoundException - If any error occurs.
java.io.IOException - If any error occurs.

restoreFromFile

public AbleBean restoreFromFile(java.lang.String theFileName)
                         throws java.lang.ClassNotFoundException,
                                java.io.IOException
Read a serialized bean from the specified file.
Parameters:
theFileName - The name of the file containing the serialized AbleBean.
Returns:
The de-serialized bean.
Throws:
java.lang.ClassNotFoundException - If any error occurs.
java.io.IOException - If any error occurs.

ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003