com.ibm.rational.test.lt.kernel.services
Interface IVirtualUserInfo


public interface IVirtualUserInfo

The IVirtualUserInfo interface provides information about the virtual user.

This interface is implemented by the object stored in the VirtualUserDataArea DataArea under the key VirtualUserInfo. This object is accessed from ICustomCode2 by calling ITestExecutionServices.findDataArea(IDataArea.VIRTUALUSER).get(IVirtualUserInfo.KEY)

See Also:
IDataArea, ITestExecutionServices

Field Summary
static java.lang.String KEY
          Key for the supplied IVirtualUserInfo object in the virtual user's DataArea.
 
Method Summary
 int getPDLogLevel()
          Returns the Problem Determination Log level that is effective for the current test.
 java.util.Random getRandom()
          Returns the virtual user's random number generator.
 int getTestLogLevel()
          Returns the TestLog level that is effective for the current virtual user.
 int getUID()
          Returns the virtual user's globally unique id.
 java.lang.String getUserGroupName()
          Returns the name of the user group to which this virtual user belongs.
 java.lang.String getUserName()
          Returns the name of the virtual user.
 int popPDLogLevel()
          Pops the Problem Determination Log level stack.
 int popTestLogLevel()
          Pops the TestLog level stack.
 void pushPDLogLevel(int level)
          Pushes the given Problem Determination Log level onto the virtual user's stack.
 void pushTestLogLevel(int level)
          Pushes the given TestLog level onto the virtual user stack.
 int setPDLogLevel(int level)
          Sets the Problem Determination Log level for the remainder of the current virtual user to the given level.
 int setTestLogLevel(int level)
          Sets the TestLog level for the remainder of the current virtual user's execution to the given level.
 

Field Detail

KEY

public static final java.lang.String KEY
Key for the supplied IVirtualUserInfo object in the virtual user's DataArea.

See Also:
Constant Field Values
Method Detail

getRandom

public java.util.Random getRandom()
Returns the virtual user's random number generator.

Returns:
The virtual user's random number generator.

getUID

public int getUID()
Returns the virtual user's globally unique id. This number is unique across all drivers and is valid for the duration of a test run.

Returns:
The GUID associated with the current virtual user for the current test run.

getUserName

public java.lang.String getUserName()
Returns the name of the virtual user.

Returns:
The name of the virtual user.

getUserGroupName

public java.lang.String getUserGroupName()
Returns the name of the user group to which this virtual user belongs.

Returns:
The name of the user group to which this virtual user belongs.

getPDLogLevel

public int getPDLogLevel()
Returns the Problem Determination Log level that is effective for the current test.

Returns:
The Problem Determination Log level that is effective for the current test.

setPDLogLevel

public int setPDLogLevel(int level)
Sets the Problem Determination Log level for the remainder of the current virtual user to the given level.

The Problem Determination Log level is kept on a stack for the virtual user. Setting the level is equivalent to popping the stack (if it is not empty) and pushing the new level.

Parameters:
level - The new Problem Determination Log level.
Returns:
The old Problem Determination Log level.
See Also:
pushPDLogLevel(), popPDLogLevel()

pushPDLogLevel

public void pushPDLogLevel(int level)
Pushes the given Problem Determination Log level onto the virtual user's stack.

This changes the effective Problem Determination Log level for the remainder of the virtual user's execution.

Parameters:
level - The new Problem Determination Log level.
See Also:
popPDLogLevel

popPDLogLevel

public int popPDLogLevel()
Pops the Problem Determination Log level stack.

This restores the effective Problem Determination Log level to the value previous to the last push.

Returns:
The popped level
See Also:
pushPDLogLevel()

getTestLogLevel

public int getTestLogLevel()
Returns the TestLog level that is effective for the current virtual user.

Returns:
The TestLog level that is effective for the current virtual user.

setTestLogLevel

public int setTestLogLevel(int level)
Sets the TestLog level for the remainder of the current virtual user's execution to the given level.

The TestLog level is kept on a stack for the virtual user. Setting the level is equivalent to popping the stack (if it is not empty) and pushing the new level.

Parameters:
level - The new TestLog level.
Returns:
The old TestLog level.
See Also:
pushTestLogLevel(), popTestLogLevel()

pushTestLogLevel

public void pushTestLogLevel(int level)
Pushes the given TestLog level onto the virtual user stack.

This changes the effective TestLog level for the remainder of the virtual user's execution.

Parameters:
level - The new TestLog level.
See Also:
popTestLogLevel

popTestLogLevel

public int popTestLogLevel()
Pops the TestLog level stack.

This restores the effective TestLog level to the value before the last push.

Returns:
The popped level.
See Also:
pushTestLogLevel()


Copyright (c) IBM Corp. and others 2005. All rights reserved