arm4::QArmCorrelator Class Reference
Represents a correlation token passed from a calling transaction to a called transaction. More...

Public Member Functions | |
QArmCorrelator () | |
constructs an empty correlator | |
QArmCorrelator (const QArmCorrelator &corr) | |
constructs a copy of the passed correlator. | |
QArmCorrelator & | operator= (const QArmCorrelator &corr) |
copies the contents of the passed correlator | |
bool | isAgentTrace () const |
indicates whether the "agent trace" flag is on in the correlator. | |
bool | isApplicationTrace () const |
indicates whether the "application trace" flag is on in the correlator. | |
bool | isAsynchronous () const |
bool | isIndependentTran () const |
int32_t | setAsynchronous (bool b) |
int32_t | setIndependentTran (bool b) |
arm_correlator_t * | get () |
obtain the pointer to the C arm_correlator_t structure. | |
operator const arm_correlator_t * () const | |
Cast operator to the C ARM 4.0 data type. | |
QString | toString () const |
Returns the correlator as a string in hex encoding. | |
bool | fromString (const QString &corr) |
copies the correlator from the passed string representation | |
bool | isNull () const |
returns true if the correlator is not used | |
Static Public Attributes | |
static const QArmCorrelator | Null |
A null correlator. |
Detailed Description
Represents a correlation token passed from a calling transaction to a called transaction.
The correlation token may be used to establish a calling hierarchy across processes and systems. A correlator contains a two-byte length field, a one-byte format ID, a one-byte flag field, plus it may contain other data that is used to uniquely identify an instance of a transaction. Applications do not need to understand correlator internals. See Appendix B of the ARM 4.0 Java Binding Specification for more information about correlator formats.
A correlation token is a maximum of QArmConstants::CORR_MAX_LENGTH bytes, including the header.
QArmCorrelator
is created in one of three ways:
-
The
QArmCorrelator()
constructor creates an empty correlator object. - QArmTransaction::getCorrelator() method creates a correlator object for the currently or most recently executed transaction.
- The QArmTranReport::generateCorrelator() method creates a correlator object for what is presumed to be the next transaction to be executed.
An application may extract the byte array in network byte order, which is the format needed to send to a called transaction, using the get()
method to obtain a pointer to the arm_correlator_t strcuture.
Constructor & Destructor Documentation
arm4::QArmCorrelator::QArmCorrelator | ( | const QArmCorrelator & | corr | ) |
constructs a copy of the passed correlator.
- Parameters:
-
corr Correlator to copy.
Member Function Documentation
bool arm4::QArmCorrelator::isAgentTrace | ( | ) | const |
indicates whether the "agent trace" flag is on in the correlator.
- Returns:
- the status of the agent trace flag.
bool arm4::QArmCorrelator::isApplicationTrace | ( | ) | const |
indicates whether the "application trace" flag is on in the correlator.
- Returns:
- the status of the application trace flag.
bool arm4::QArmCorrelator::isAsynchronous | ( | ) | const |
indicates whether the "asynchronous" flag is on in the correlator.
- Returns:
- the status of the asynchronous flag.
- Since:
- ARM 4.1
bool arm4::QArmCorrelator::isIndependentTran | ( | ) | const |
indicates whether the "independent transaction" flag is on in the correlator.
- Returns:
- the status of the independent flag.
- Since:
- ARM 4.1
QArmCorrelator& arm4::QArmCorrelator::operator= | ( | const QArmCorrelator & | corr | ) |
copies the contents of the passed correlator
- Parameters:
-
corr Correlator to copy contents from.
- Returns:
- reference to this correlator;
int32_t arm4::QArmCorrelator::setAsynchronous | ( | bool | b | ) |
causes the "asynchronous" flag to be set to the specified boolean value.
- Parameters:
-
b the new status of the asynchronous flag.
- Returns:
- 0 on success; otherwise, a non-zero error code is returned (as specified in QArmInterface).
- Since:
- ARM 4.1
int32_t arm4::QArmCorrelator::setIndependentTran | ( | bool | b | ) |
causes the "independent transaction" flag to be set to the specified boolean value.
- Parameters:
-
b the new status of the independent flag.
- Returns:
- 0 on success; otherwise, a non-zero error code is returned (as specified in QArmInterface).
- Since:
- ARM 4.1
The documentation for this class was generated from the following file:
- QArm4/QArmCorrelator