All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.habanero.replay.FileRecorderFactory

java.lang.Object
   |
   +----ncsa.habanero.replay.ObserverFactory
           |
           +----ncsa.habanero.replay.FileRecorderFactory

public class FileRecorderFactory
extends ObserverFactory
FileRecorderFactory is a factory object that produces recording output stream. This object will create a set of files and store them in a single directory. The directory will be specified by the user, and the files will be Collobject.Stream#.


Constructor Index

 o FileRecorderFactory(String, boolean)

Method Index

 o checkDirectory(String)
 o createObserver(String, String, String)
 o createObserverStream(String, String, String)
 o queryDestination()
 o resumeObserving()
 o stopObserving()

Constructors

 o FileRecorderFactory
 public FileRecorderFactory(String strDir,
                            boolean bClient)
Parameters:
bClient - are we in client mode
strDir - the name of the directory
Returns:
creates a recorder factory

Methods

 o checkDirectory
 public void checkDirectory(String strDir)
Parameters:
strDir - the name of the directory
Returns:
checks that the directory exists, and creates it if necessary
 o createObserver
 public MarshallOutput createObserver(String strSessionName,
                                      String strClientName,
                                      String strTag) throws IOException
Parameters:
strSessionName - the name of the session
strClientName - the name of the client
strTag - the tag attached to the end of the string
Returns:
OutputStream the output stream which should be used for recording
Throws: IOException
thrown when a stream is not able to be created
Overrides:
createObserver in class ObserverFactory
 o createObserverStream
 public OutputStream createObserverStream(String strSessionName,
                                          String strClientName,
                                          String strTag) throws IOException
Parameters:
strSessionName - the name of the session
strClientName - the name of the client
strTag - the tag attached to the end of the string
Returns:
OutputStream the output stream which should be used for recording
Throws: IOException
thrown when a stream is not able to be created
Overrides:
createObserverStream in class ObserverFactory
 o queryDestination
 public String queryDestination()
Returns:
the name of the directory we are recording to
Overrides:
queryDestination in class ObserverFactory
 o stopObserving
 public void stopObserving()
Returns:
tells all the files to stop recording now
Overrides:
stopObserving in class ObserverFactory
 o resumeObserving
 public void resumeObserving()
Returns:
starts recording again
Overrides:
resumeObserving in class ObserverFactory

All Packages  Class Hierarchy  This Package  Previous  Next  Index