sophware.home.io
Class PersistentHomeStorage

java.lang.Object
  extended by sophware.home.io.MemoryHomeStorage
      extended by sophware.home.io.PersistentHomeStorage
All Implemented Interfaces:
HomeStorage
Direct Known Subclasses:
FileHomeStorage

public abstract class PersistentHomeStorage
extends MemoryHomeStorage

The PersistentHomeStorage is an abstract class that provides a foundation for the implementation of persistent HomeStorage

Version:
1.0, 03/19/07
Author:
Russell Soph

Constructor Summary
PersistentHomeStorage()
           
 
Method Summary
 void close()
          flushes and closes the streams associated with this storage
 void flush()
          flush this data store to the ObjectOutputStream
abstract  java.io.ObjectInputStream getInputStream()
          Get the ObjectInputStream from which the HomeStorage is initialized
abstract  java.io.ObjectOutputStream getOutputStream()
          Get the ObjectOutputStream to which the HomeStorage is saved
 void open()
          Initializes storage from stream
 
Methods inherited from class sophware.home.io.MemoryHomeStorage
add, contains, get, get, getAll, getAll, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistentHomeStorage

public PersistentHomeStorage()
Method Detail

open

public void open()
          throws java.io.IOException,
                 java.lang.ClassNotFoundException
Initializes storage from stream

Specified by:
open in interface HomeStorage
Overrides:
open in class MemoryHomeStorage
Throws:
java.io.IOException
java.lang.ClassNotFoundException
See Also:
getInputStream()

getInputStream

public abstract java.io.ObjectInputStream getInputStream()
                                                  throws java.io.IOException
Get the ObjectInputStream from which the HomeStorage is initialized

Throws:
java.io.IOException

getOutputStream

public abstract java.io.ObjectOutputStream getOutputStream()
                                                    throws java.io.IOException
Get the ObjectOutputStream to which the HomeStorage is saved

Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
flush this data store to the ObjectOutputStream

Specified by:
flush in interface HomeStorage
Overrides:
flush in class MemoryHomeStorage
Throws:
java.io.IOException
See Also:
getOutputStream()

close

public void close()
           throws java.io.IOException
flushes and closes the streams associated with this storage

Specified by:
close in interface HomeStorage
Overrides:
close in class MemoryHomeStorage
Throws:
java.io.IOException