org.arm4.arm40.tranreport

Class ArmTranReport

public class ArmTranReport extends ArmTransaction implements ArmTranReport

Transaction instance for application-based and/or remote time measurement.

ArmTranReport is similar to ArmTransaction. Both are used to provide data about executing transactions. Instances of both are created based on metadata represented by an ArmTransactionDefinition, which in turn is scoped by an application definition. Both are scoped by a running application instance, represented by ArmApplication. There are two fundamental differences:

When executing in the same JVM, the ArmTranReport object is created with an ArmApplication. When executing in a different JVM on the same system or on a different system, the ArmTranReport object is created with an ArmApplicationRemote (a subclass of ArmApplication).

The two key methods of ArmTranReport are generateCorrelator and ArmTranReport.

As noted above, generateCorrelator() updates the internal state for a new transaction instance. The first time report() executes after generateCorrelator(), report() will not update the internal state for a new transaction instance; it will use the instance identifier from the generateCorrelator(). If report() executes twice in succession, or if generateCorrelator() has never been executed, report() will update the internal state for a new transaction instance. Summarizing, there are two patterns: In addition to the identity properties from ArmApplication and ArmTransactionDefinition, there are four optional setter methods to establish additional instance-level context. They can be used at any time to update the attribute within the object. The only time the properties are meaningful is when generateCorrelator() or report() executes. At the moment either method executes, the current values are used, any or all of which may be null. See the description provided for the individual methods below.

Objects implementing this interface are created using ArmTranReportFactory.

Version: $Revision$ $Date$

Author: dcarter

Field Summary
protected longm_responseTime
protected intm_status
Constructor Summary
ArmTranReport(ArmApplication app, ArmTransactionDefinition definition, ArmFactory factory)
Create ARM Transaction Report.
ArmTranReport(ArmApplication app, ArmTransactionDefinition definition, ArmMetricGroup group, ArmFactory factory)
Create ARM Transaction Report.
Method Summary
ArmCorrelatorgenerateCorrelator()
longgetResponseTime()
intgetStatus()
intreport(int status, long respTime)
intreport(int status, long respTime, long stopTime)
intreport(int status, long respTime, String diagnosticDetail)
intreport(int status, long respTime, long stopTime, String diagnosticDetail)

Field Detail

m_responseTime

protected long m_responseTime

m_status

protected int m_status

Constructor Detail

ArmTranReport

public ArmTranReport(ArmApplication app, ArmTransactionDefinition definition, ArmFactory factory)
Create ARM Transaction Report.

Parameters: app definition factory

ArmTranReport

public ArmTranReport(ArmApplication app, ArmTransactionDefinition definition, ArmMetricGroup group, ArmFactory factory)
Create ARM Transaction Report.

Parameters: app definition group factory

Method Detail

generateCorrelator

public ArmCorrelator generateCorrelator()

getResponseTime

public long getResponseTime()

getStatus

public int getStatus()

report

public int report(int status, long respTime)

report

public int report(int status, long respTime, long stopTime)

report

public int report(int status, long respTime, String diagnosticDetail)

report

public int report(int status, long respTime, long stopTime, String diagnosticDetail)