Class CollectorStorage
java.lang.Object
|
+----CollectorStorage
- public class CollectorStorage
- extends Object
Provides the storage mechanisms used for CollectorUpdate
objects.
- Version:
- $Revision: 1.5 $, $Date: 2000/10/12 14:09:44 $
- Author:
- Mike Spengler
-
inName
- The name of the input stream if a file
-
ois
- The input stream for the Collector
-
oos
- The output stream for the Collector
-
outName
- The name of the output stream if a file
-
rcount
- Running reference count.
-
CollectorStorage(ConfigMgr)
- Class constructor.
-
closeIn()
- Closes the
CollectorUpdate input file.
-
closeOut()
- Closes the
CollectorUpdate save file.
-
finalize()
- Ensures that all
CollectorUpdate streams are closed.
-
openIn(ConfigMgr)
- Opens the
CollectorUpdate input file, if specified.
-
openOut(ConfigMgr)
- Opens the
CollectorUpdate save file, if specified.
-
readCU()
- Reads the next
CollectorUpdate object from the input
file, if one was specified.
-
usingNetQuery()
- Returns
true if the CollectorUpdate data
is configured to be dynamically acquired from the network.
-
writeCU(CollectorUpdate)
- Writes the supplied
CollectorUpdate object to the save
file, if one was specified.
inName
public String inName
- The name of the input stream if a file
outName
public String outName
- The name of the output stream if a file
ois
private ObjectInputStream ois
- The input stream for the Collector
oos
private ObjectOutputStream oos
- The output stream for the Collector
rcount
private int rcount
- Running reference count. Used to force a stream reset periodically
to prevent memory problems.
CollectorStorage
public CollectorStorage(ConfigMgr cm) throws IOException
- Class constructor.
- Parameters:
- cm - the configuration manager containing all
configuration information for this run
- Throws: IOException
- if any files couldn't be opened
usingNetQuery
public boolean usingNetQuery()
- Returns
true if the CollectorUpdate data
is configured to be dynamically acquired from the network.
- Returns:
-
true if the CollectorUpdate data
is to be sourced from the network.
openIn
private void openIn(ConfigMgr cm) throws IOException
- Opens the
CollectorUpdate input file, if specified.
- Parameters:
- cm - the configuration manager containing all
configuration information for this run
- Throws: IOException
- if the file couldn't be opened
readCU
public CollectorUpdate readCU() throws IOException
- Reads the next
CollectorUpdate object from the input
file, if one was specified.
- Returns:
- the next
CollectorUpdate object read
- Throws: IOException
- if an I/O error occurs
closeIn
private void closeIn() throws IOException
- Closes the
CollectorUpdate input file.
- Throws: IOException
- if an I/O error occurs
openOut
private void openOut(ConfigMgr cm) throws IOException
- Opens the
CollectorUpdate save file, if specified.
- Parameters:
- cm - the configuration manager containing all
configuration information for this run
- Throws: IOException
- if the save file couldn't be opened
writeCU
public void writeCU(CollectorUpdate cu) throws IOException
- Writes the supplied
CollectorUpdate object to the save
file, if one was specified.
- Parameters:
- cu - the
CollectorUpdate object to be
written
- Throws: IOException
- if an I/O error occurs
closeOut
private void closeOut() throws IOException
- Closes the
CollectorUpdate save file.
- Throws: IOException
- if an I/O error occurs
finalize
protected void finalize() throws IOException
- Ensures that all
CollectorUpdate streams are closed.
- Throws: IOException
- if an I/O error occurs
- Overrides:
- finalize in class Object