IBM Rational Performance Tester SDK

com.ibm.rational.test.lt.kernel.action
Interface IContainer

All Superinterfaces:
ICountable, IKAction, IKLog, IKSemaphore, ITestExecutionServices, Runnable
All Known Subinterfaces:
IEngine, IFor, IKLoadTestSchedule, IKTransaction, IKUserGroup, ILoop, IPacedLoop, IParallel, IWhile
All Known Implementing Classes:
com.ibm.rational.test.lt.kernel.action.impl.Container, com.ibm.rational.test.lt.kernel.action.impl.KContainer, com.ibm.rational.test.lt.kernel.action.impl.KScript, LTTestScript

public interface IContainer
extends IKAction

Interface for a collection of related actions.

This interface is the basic unit of scheduling. It contains a group of actions that have some logical connection.

For example, if a group of actions are to be executed only if a condition evaluates to 'true', the actions to be performed are placed together inside a container. The container is then passed to the branching action.

Containers are intended to be nested for use by various flow-control actions.


Field Summary
 
Fields inherited from interface com.ibm.rational.test.lt.kernel.action.IKAction
ABANDONED, DP_ENCRYPTED_VALUES_KEY, EXECUTING, FINISHED, HANDLETIMER, SEMWAIT, SLEEPING, Status, UNSTARTED
 
Fields inherited from interface com.ibm.rational.test.lt.kernel.logging.IKLog
HISTORY_ALL, HISTORY_NONE, HISTORY_PAGES, HISTORY_REQUESTS, HISTORY_SCHEDULE, LOG_ALL, LOG_CONFIG, LOG_FINE, LOG_FINER, LOG_FINEST, LOG_INFO, LOG_NONE, LOG_SEVERE, LOG_WARNING, STATISTIC_ALL, STATISTIC_NONE, STATISTIC_PAGES
 
Fields inherited from interface com.ibm.rational.test.lt.kernel.services.ITestExecutionServices
STORAGE_LOCAL, STORAGE_USER
 
Method Summary
 void add(IKAction action)
          Add an action to this container.
 void addCatch(IKExceptionHandler handler)
          Add an exception handler action to the container.
 void addFinally(IKAction initialAction)
          Adds a KAction to the FINALLY clause for this container.
 void addInitially(IKAction initialAction)
          Adds a KAction to the INITIALLY clause for this container.
 IKAction current()
           
 void finish(IKAction child)
          Indicate that processing has finished for this action.
 IKAction get(String actionName)
           
 Iterator getActions()
           
 IKAction[] getActionsArray()
           
 int getChildCount()
           
 String getParentHistoryId()
           
 org.eclipse.hyades.test.common.event.TypedEvent getStartEvent()
           
 String getStartHistoryId()
           
 org.eclipse.hyades.test.common.event.TypedEvent getStopEvent()
           
 com.ibm.rational.test.lt.kernel.action.impl.UserGroup getUserGroup()
           
 com.ibm.rational.test.lt.kernel.engine.impl.VirtualUser getVirtualUser()
           
 boolean isAllowChildrenToPageTestLog()
           
 IKAction next()
           
 String nextHistoryId()
           
 IKAction previous()
           
 void recordChildExecutionTime(IKAction child)
           
 void registerChildVerdict(int verdict)
           
 void registerChildVerdict(int verdict, int count)
           
 void registerChildVerdict(String id, int verdict)
          informs the parent of a child verdict
 void registerChildVerdict(String id, int verdict, int count)
          informs the parent of 1 or more child verdicts
 boolean remove(IKAction action)
          Remove an action from this container.
 boolean rollUpVerdicts()
          reports verdicts summarizing the verdicts reported by the container's children See KContainer: reportingRollUp(), passThroughRollUp(), and nullRollUp() for three "standard" algorithms.
 void setAllowChildrenToPageTestLog(boolean ok)
          indicates that it is safe (or not) for the testLog loading code in the workbench to unload the child testLog events associated with this container's testLog start event during runtime processing.
 void setStartHistoryId(String id)
          Saves the execution history event id for the container's start event The container's start event is the parent event for all events generated by the container This id is not null iff the container reported a start event.
 void stopChildren(boolean actGlobally)
          stops all currently running child actions and prevents new ones from starting.
 IKAction verifyParentRelationships()
          Verify parent/child relationships in this container and below This method was addded in order to address the possibility that an action could have been added to multiple containers.
 
Methods inherited from interface com.ibm.rational.test.lt.kernel.action.IKAction
abandon, addEventBehavior, blocked, execute, executeAction, executionTime, findDataArea, finish, getBlockedTimeout, getHistory, getHistoryType, getId, getName, getParent, getResultInteger, getResultObject, getResultString, getRtbEnabled, getStatTree, getStopRequested, getSubsystem, getTimeoutDuration, getTimeoutScheme, getVirtualUserName, getWorkerThread, hasFinished, hasStarted, isRunning, reset, setBlockedTimeout, setDispatchingAction, setHistory, setHistoryType, setId, setResultInteger, setResultObject, setResultString, setResultString, setRtbEnabled, setStatTree, start, status, stop, stop, stopAction
 
Methods inherited from interface com.ibm.rational.test.lt.kernel.ICountable
addCounter, getCounter, getCounters, resetCounters
 
Methods inherited from interface com.ibm.rational.test.lt.kernel.logging.IKLog
getHistoryLevel, getHistoryLevel, getLogLevel, getStatisticsLevel, getVirtualUserGUID, log, log, log, log, reportEvent, reportEvent, reportEvent, reportMessage, reportMessage, reportMessage, reportVerdict, reportVerdict, reportVerdict, reportVerdict, reportVerificationPoint, reportVerificationPoint, reportVerificationPoint, reportVerificationPoint, reportVerificationPoint, reportVerificationPoint, wouldARM, wouldLog, wouldReportHistory, wouldReportHistory, wouldReportStatistics
 
Methods inherited from interface com.ibm.rational.test.lt.kernel.action.IKSemaphore
acquire, availablePermits, getQueue, getQueueLength, reducePermits, release, release, toString, tryAcquire, tryAcquire
 
Methods inherited from interface com.ibm.rational.test.lt.kernel.services.ITestExecutionServices
getARM, getLoopControl, getPDLogManager, getStatisticsManager, getTestLogManager, getTime, getTransaction, getValue, setValue
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

add

void add(IKAction action)
Add an action to this container.

Adds a non-dispatched, non-running action.

Parameters:
action - to add

remove

boolean remove(IKAction action)
Remove an action from this container.

Removes an action.

Parameters:
action - to remove
Returns:
true if the item was on the list false if the item was not on the list

get

IKAction get(String actionName)

getActions

Iterator getActions()

getActionsArray

IKAction[] getActionsArray()

getChildCount

int getChildCount()

next

IKAction next()

previous

IKAction previous()

current

IKAction current()

verifyParentRelationships

IKAction verifyParentRelationships()
Verify parent/child relationships in this container and below

This method was addded in order to address the possibility that an action could have been added to multiple containers. Doing so would reset the parent container to the last one to which it was added. This would result in some containers never receiving the proper number of 'finish(...)' calls, hanging the execution.

Returns:
the first action whose parent is not correctly set to its parent; null otherwise

finish

void finish(IKAction child)
Indicate that processing has finished for this action.

Note: The implication here is that the action is complete and the container should continue on to the next action in the container.

Parameters:
child - the child action that has finished
Throws:
ActionException - if the action has not been started
See Also:
IKAction.execute(), IKAction.start(), IKAction.isRunning()

recordChildExecutionTime

void recordChildExecutionTime(IKAction child)

nextHistoryId

String nextHistoryId()
Returns:
the next available execution history event id

setStartHistoryId

void setStartHistoryId(String id)
Saves the execution history event id for the container's start event The container's start event is the parent event for all events generated by the container This id is not null iff the container reported a start event.

Parameters:
id -

getStartHistoryId

String getStartHistoryId()
Returns:
the saved start execution history id. null if there is no start event

getParentHistoryId

String getParentHistoryId()
Returns:
the execution history id of the most recent ancestor container that reported a start event

getStartEvent

org.eclipse.hyades.test.common.event.TypedEvent getStartEvent()

getStopEvent

org.eclipse.hyades.test.common.event.TypedEvent getStopEvent()

getVirtualUser

com.ibm.rational.test.lt.kernel.engine.impl.VirtualUser getVirtualUser()

getUserGroup

com.ibm.rational.test.lt.kernel.action.impl.UserGroup getUserGroup()

rollUpVerdicts

boolean rollUpVerdicts()
reports verdicts summarizing the verdicts reported by the container's children See KContainer: reportingRollUp(), passThroughRollUp(), and nullRollUp() for three "standard" algorithms.

Returns:
true if one or more verdicts was reported during the roll up, false if not.

registerChildVerdict

void registerChildVerdict(String id,
                          int verdict,
                          int count)
informs the parent of 1 or more child verdicts

Parameters:
id - comma seperated list of ids
verdict -
count -

registerChildVerdict

void registerChildVerdict(String id,
                          int verdict)
informs the parent of a child verdict

Parameters:
id -
verdict -

registerChildVerdict

void registerChildVerdict(int verdict,
                          int count)

registerChildVerdict

void registerChildVerdict(int verdict)

setAllowChildrenToPageTestLog

void setAllowChildrenToPageTestLog(boolean ok)
indicates that it is safe (or not) for the testLog loading code in the workbench to unload the child testLog events associated with this container's testLog start event during runtime processing. It is not safe to unload child events when more child events are possible (such as for Schedule or UserGroup containers since they run on multiple computers and therefore no one computer can know when all children have been sent,) or for HTTPPage containers since the HTTP protocol data viewer needs the events in memory so the page can be displayed. The default value of this is to inherit the effective value from the parent container. It is not expected that any containers would need to set this to true. The value is true for UserGroups (allowing the VirtualUser containers to page) and therefore all children of the UserGroup will inherit permission to page. If some ancestor container (such as HTTPPage) sets this to false, then it is unlikely that a child of that container should need to override for it's children.

Parameters:
ok -

isAllowChildrenToPageTestLog

boolean isAllowChildrenToPageTestLog()
Returns:
the effective value of the flag.

stopChildren

void stopChildren(boolean actGlobally)
stops all currently running child actions and prevents new ones from starting.

Parameters:
actGlobally - indicates whether the stop applies to other engines (for schedules and userGroups)

addCatch

void addCatch(IKExceptionHandler handler)
Add an exception handler action to the container. If a handler already exists for the same exception, this handler will replace the previously added handler.

Parameters:
handler - An IKExceptionHandler that pairs an exception class with a KAction to run when the exception occurs.

addFinally

void addFinally(IKAction initialAction)
Adds a KAction to the FINALLY clause for this container. The FINALLY clause will be run whenever this container stops whether stopped by normal completion of all children, user request, or exception.

Parameters:
finalAction -

addInitially

void addInitially(IKAction initialAction)
Adds a KAction to the INITIALLY clause for this container. The INITIALLY clause will be run whenever this container starts execution before any of the normal child actions are run. This is really only necessary for Parallel containers since simply adding a child first should suffice for regular containers but it may prove useful so it is supported for all containers.

Parameters:
initialAction -

IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2012. All rights reserved.