All Packages    This Package  Previous  Next  

Class sqlj.runtime.profile.util.AuditorInstaller

java.lang.Object
   |
   +----sqlj.runtime.profile.util.AuditorInstaller

public class AuditorInstaller
extends Object
implements ProfileCustomizer
The auditor installer class is used as a command line utility to install (or uninstall) debugging class-auditors into an existing set of binary profiles. Once installed, all RTStatement and RTResultSet calls made during application runtime will be logged to a file (or standard output), which can then be inspected to verify expected behavior and trace errors. Note that only those calls made to the underlying RTStatement and RTResultSet call interface at runtime are audited. An AuditedProfile instance is invoked at application runtime to pass calls made by the runtime to the auditor instance. A PrintWriterAuditor is used as the auditor instance.

The auditor installer utility is invoked as follows:

% java sqlj.runtime.profile.util.AuditorInstaller [options] profile.ser...

Auditor installer options are as follows:

-Cuninstall
Removes the debugging class-auditors that were installed during the last invocation of the auditor installer utility. If this option is not specified, class-auditors are installed rather than removed. If the uninstall option is used, all other options are ignored.
-Clog=logFileName
Specifies the name of the log file into which call audits will be appended at runtime. If this option is not specified, audits will be written to standard out at runtime. Note that audits are appended to the log file rather than creating a new log file for each program run. Appending allows multiple program runs to be logged in the same file, and also allows two debugging auditors to write the same log during the same program run.
-Cprefix=auditorLogPrefixString
Specifies the prefix which will precede each audit line created by this auditor installation. If this option is not specified, no prefix is used. The prefix option is useful when multiple debugging auditors are installed that write to the same log file.
-Cdepth=debugLayeringDepth
Specifies an integer number that identifies the profile layer number to audit at runtime. Often a particular program will use a number of different customized profile layers, each of which provides some level of additional functionality to the runtime. Some calls made to one layer will not be passed on to lower layers. By specifying a depth option, it is possible to determine exactly what calls are being made at a particular layer. If this option is not specified or the number specified exceeds the layers available at runtime, the maximum depth possible is used. A depth of -1 indicates to use maximum depth possible. Use depth 0 to audit the sequence of calls issued directly from the SQLJ runtime engine and code generation.

Note that the AuditorInstaller utility is a Customizer that uses the CustomizerHarness to map itself over a series of profiles. Accordingly, it also inherits all of the options made available by the CustomizerHarness.

Usage notes:

See Also:
Auditor, AuditedProfile, PrintWriterAuditor, CustomizerHarness

Constructor Index

 o AuditorInstaller()

Method Index

 o acceptsConnection(Connection)
 o customize(Profile, Connection, ErrorLog)
Customizes the passed profile.
 o getDepth()
 o getLog()
 o getPrefix()
 o getUninstall()
 o main(String[])
The main command-line entry point for this method.
 o mainStatus(String[])
The main command-line entry point for this method.
 o newCustomization(Customization)
Returns a new audited customization object which will wrap the passed customization.
 o setDepth(int)
 o setLog(String)
 o setPrefix(String)
 o setUninstall(boolean)

Constructors

 o AuditorInstaller
 public AuditorInstaller()

Methods

 o acceptsConnection
 public boolean acceptsConnection(Connection conn)
 o getUninstall
 public boolean getUninstall()
 o setUninstall
 public void setUninstall(boolean uninstall)
 o getLog
 public String getLog()
 o setLog
 public void setLog(String logFileName)
 o getPrefix
 public String getPrefix()
 o setPrefix
 public void setPrefix(String auditPrefix)
 o getDepth
 public int getDepth()
 o setDepth
 public void setDepth(int debugDepth)
 o customize
 public boolean customize(Profile p,
                          Connection conn,
                          ErrorLog log)
Customizes the passed profile. If installing, a new audited customization wraps and replaces each customization currently registered in the profile, and a catch-all audited customization is added to the end of the list for the default case. If de-installing, each audited customization instance registered in the profile is replaced with the customization it wraps.

Returns:
s true if profile was customized, false otherwise.
 o newCustomization
 protected AuditorInstaller. AuditedCustomization newCustomization(Customization wrappedCustomization)
Returns a new audited customization object which will wrap the passed customization. The audited customization returned will be installed into the profile in place of the passed customization argument. Subclasses should override this method if a different audited customization instance is desired.

 o main
 public static void main(String args[])
The main command-line entry point for this method. Calls System.exit with the result of mainStatus.

 o mainStatus
 public static int mainStatus(String args[])
The main command-line entry point for this method. See the class overview for a description of the command-line options and functionality.


All Packages    This Package  Previous  Next