com.ibm.websphere.logging.hpel.writer
Class CompatibilityRepositoryExporter
- java.lang.Object
-
- com.ibm.websphere.logging.hpel.writer.CompatibilityRepositoryExporter
-
- All Implemented Interfaces:
- RepositoryExporter
- Direct Known Subclasses:
- CompatibilityZipRepositoryExporter
public class CompatibilityRepositoryExporter extends java.lang.Object implements RepositoryExporter
Implementation of theRepositoryExporter
interface exporting log records into a text file in Basic or Advanced WebSphere format. The methodstoreHeader
must be called before any records can be stored. Each record is stored with thestoreRecord
function. Failure to follow the order will result in runtime exceptions.
-
-
Constructor Summary
Constructors Modifier Constructor and Description CompatibilityRepositoryExporter(java.io.File outputFile, HpelFormatter formatter)
Creates an instance for storing records in a file in a Basic or Advanced text format.protected
CompatibilityRepositoryExporter(java.io.OutputStream out, HpelFormatter formatter)
Creates an instance for writing records into a stream in a Basic or Advanced text format.CompatibilityRepositoryExporter(java.io.PrintStream out, HpelFormatter formatter)
Creates an instance for writing records into a stream in a Basic or Advanced text format.
-
Method Summary
Methods Modifier and Type Method and Description void
close()
flushes and closes the output streamvoid
storeHeader(java.util.Properties header)
Stores the header properties into the output filevoid
storeHeader(java.util.Properties header, java.lang.String subProcess)
Writes header information into exported sub process repository.void
storeRecord(RepositoryLogRecord record)
Stores a RepositoryLogRecord into the proper text format
-
-
-
Constructor Detail
-
CompatibilityRepositoryExporter
public CompatibilityRepositoryExporter(java.io.File outputFile, HpelFormatter formatter) throws java.io.IOException
Creates an instance for storing records in a file in a Basic or Advanced text format.- Parameters:
outputFile
- output fileformatter
- formatter to use when converting LogRecords into text- Throws:
java.io.IOException
- if an I/O error has occurred
-
CompatibilityRepositoryExporter
protected CompatibilityRepositoryExporter(java.io.OutputStream out, HpelFormatter formatter)
Creates an instance for writing records into a stream in a Basic or Advanced text format.- Parameters:
out
- output stream.formatter
- formatter to use when converting LogRecords into text- See Also:
HpelFormatter
-
CompatibilityRepositoryExporter
public CompatibilityRepositoryExporter(java.io.PrintStream out, HpelFormatter formatter)
Creates an instance for writing records into a stream in a Basic or Advanced text format.- Parameters:
out
- output stream.formatter
- formatter to use when converting LogRecords into text- See Also:
HpelFormatter
-
-
Method Detail
-
close
public void close()
flushes and closes the output stream- Specified by:
close
in interfaceRepositoryExporter
-
storeHeader
public void storeHeader(java.util.Properties header)
Stores the header properties into the output file- Specified by:
storeHeader
in interfaceRepositoryExporter
- Parameters:
header
- Properties (key/value) storing header information
-
storeHeader
public void storeHeader(java.util.Properties header, java.lang.String subProcess)
Description copied from interface:RepositoryExporter
Writes header information into exported sub process repository. This call starts export of a new sub process instance. It should be called after all records of the main process were exported withRepositoryExporter.storeRecord(RepositoryLogRecord)
.- Specified by:
storeHeader
in interfaceRepositoryExporter
- Parameters:
header
- Header information related to all consequent log records.subProcess
- String identifier of the sub process. Use the key corresponding to the sub process used inServerInstanceLogRecordList.getChildren()
map.
-
storeRecord
public void storeRecord(RepositoryLogRecord record)
Stores a RepositoryLogRecord into the proper text format- Specified by:
storeRecord
in interfaceRepositoryExporter
- Parameters:
record
- RepositoryLogRecord which formatter will convert to Basic or Advanced output format
-
-