org.erights.e.elib.serial
Class Reviver

java.lang.Object
  |
  +--org.erights.e.elib.serial.Reviver
Direct Known Subclasses:
CapTPReviver, PersistenceReviver, Unserializer

public abstract class Reviver
extends Object

Untamed: Used to parameterize an UnserializationStream.

UnserializationStream will probably need more parameters, but we should add them as we find we need them, rather than create another subclass.

Likely additional parameters:

Author:
Mark S. Miller

Constructor Summary
Reviver()
          Enabled:
 
Method Summary
 UnserializationStream getUnserializationStream(InputStream inp)
          Enabled:
 Object play(byte[] recording)
          Enabled:
 Object playFile(File file)
          Enabled:
protected abstract  Object substitute(Object ref)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Reviver

public Reviver()
Enabled:

Method Detail

substitute

protected abstract Object substitute(Object ref)
Parameters:
ref - The object that was reconstructed from the serialization stream.
Returns:
The object to return in its stead -- as its revival.

getUnserializationStream

public UnserializationStream getUnserializationStream(InputStream inp)
                                               throws IOException
Enabled:

Parameters:
inp -
Returns:
Throws:
IOException

play

public Object play(byte[] recording)
            throws IOException,
                   ClassNotFoundException
Enabled:

IOException
ClassNotFoundException

playFile

public Object playFile(File file)
                throws IOException,
                       ClassNotFoundException
Enabled:

IOException
ClassNotFoundException


comments?