IBM Rational Performance Tester SDK

com.ibm.rational.test.lt.recorder.core.annotations
Interface ITransactionAnnotationStateHandler

All Superinterfaces:
IAnnotationStateHandler

public interface ITransactionAnnotationStateHandler
extends IAnnotationStateHandler

A state handler that manages transaction-related annotations. The managed annotation types are RecorderAnnotation.START_TRANSACTION_TYPE and RecorderAnnotation.END_TRANSACTION_TYPE. This handler manages a transaction stack, whose state can be retrieved or modified using methods in this interface. For obtaining an instance of this state handler, invoke DelegaterComponent.getProperty(String) on the annotation recorder, with a property name that concatenates RecorderCore.ANNOTATION_STATE_HANDLER_PREFIX and one of the annotation types managed by this handler.


Method Summary
 boolean canEndTransaction()
          Returns whether a transaction can be ended, i.e. whether there is an active transaction.
 void endTransaction(long interactionTime)
          Ends the current transaction.
 String getCurrentTransactionName()
          Returns the current transaction name, or null if there is no active transaction.
 void startTransaction(String name, long interactionTime)
          Starts a new transaction, nested in the current transaction if there is one.
 
Methods inherited from interface com.ibm.rational.test.lt.recorder.core.annotations.IAnnotationStateHandler
addListener, removeListener
 

Method Detail

canEndTransaction

boolean canEndTransaction()
Returns whether a transaction can be ended, i.e. whether there is an active transaction.

Returns:
whether a transaction can be ended, i.e. whether there is an active transaction.

endTransaction

void endTransaction(long interactionTime)
Ends the current transaction. This has no effect if there is no active transaction.

Parameters:
interactionTime -

startTransaction

void startTransaction(String name,
                      long interactionTime)
Starts a new transaction, nested in the current transaction if there is one.

Parameters:
interactionTime -

getCurrentTransactionName

String getCurrentTransactionName()
Returns the current transaction name, or null if there is no active transaction.

Returns:

IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2012. All rights reserved.