com.ibm.websphere.logging.hpel.writer

Class CompatibilityRepositoryExporter

  1. java.lang.Object
  2. extended bycom.ibm.websphere.logging.hpel.writer.CompatibilityRepositoryExporter
All implemented interfaces:
RepositoryExporter
Direct known subclasses:
CompatibilityZipRepositoryExporter

  1. public class CompatibilityRepositoryExporter
  2. extends java.lang.Object
  3. implements RepositoryExporter
Implementation of the RepositoryExporter interface exporting log records into a text file in Basic or Advanced WebSphere format. The method storeHeader must be called before any records can be stored. Each record is stored with the storeRecord function. Failure to follow the order will result in runtime exceptions.

Constructor Summary

Modifier Constructor and Description
  1. (package private)
CompatibilityRepositoryExporter(java.io.File outputFile,HpelFormatter formatter)
Creates an instance for storing records in a file in a Basic or Advanced text format.
  1. protected
CompatibilityRepositoryExporter(java.io.OutputStream out,HpelFormatter formatter)
Creates an instance for writing records into a stream in a Basic or Advanced text format.
  1. (package private)
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

Modifier and Type Method and Description
  1. void
close()
flushes and closes the output stream
  1. void
storeHeader(java.util.Properties header)
Stores the header properties into the output file
  1. void
storeHeader(java.util.Properties header,java.lang.String subProcess)
  1. void
storeRecord(RepositoryLogRecord record)
Stores a RepositoryLogRecord into the proper text format
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CompatibilityRepositoryExporter

  1. public CompatibilityRepositoryExporter( java.io.File outputFile,
  2. HpelFormatter formatter)
  3. throws java.io.IOException
Creates an instance for storing records in a file in a Basic or Advanced text format.
Parameters:
outputFile - output file
formatter - formatter to use when converting LogRecords into text
Throws:
java.io.IOException - if an I/O error has occurred

CompatibilityRepositoryExporter

  1. protected CompatibilityRepositoryExporter( java.io.OutputStream out,
  2. 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:

CompatibilityRepositoryExporter

  1. public CompatibilityRepositoryExporter( java.io.PrintStream out,
  2. 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:

Method Detail

close

  1. public void close()
flushes and closes the output stream
Specified by:
close in interface RepositoryExporter

storeHeader

  1. public void storeHeader(java.util.Properties header)
Stores the header properties into the output file
Specified by:
Parameters:
header - Properties (key/value) storing header information

storeHeader

  1. public void storeHeader(java.util.Properties header,
  2. 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 with RepositoryExporter.storeRecord(RepositoryLogRecord).
Specified by:
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 in ServerInstanceLogRecordList.getChildren() map.

storeRecord

  1. public void storeRecord(RepositoryLogRecord record)
Stores a RepositoryLogRecord into the proper text format
Specified by:
Parameters:
record - RepositoryLogRecord which formatter will convert to Basic or Advanced output format