Java Add-in Extensibility API Reference > com.mercury.ftjadin.infra > RecordMessage



com.mercury.ftjadin.infra
Class RecordMessage

java.lang.Object
  extended bycom.mercury.ftjadin.infra.RecordMessage

public class RecordMessage
extends java.lang.Object

The RecordMessage class represents a single recorded line to be sent to UFT to be written as a new test step. Instances of this class are not created with NEW, but are returned by a call to getRecordMessageInstance.


Constructor Summary
protected RecordMessage()
           
 
Method Summary
 RecordMessageaddParam(ConstantParam constant)
          Adds a ConstantParam argument to the test object method call at the specified position.
 RecordMessageaddParam(int position)
          Adds an argument to the test object method call at the specified position.
 RecordMessageaddParam(java.lang.String s)
          Adds a string argument to the test object method call at the specified position.
 java.lang.StringgetCommand()
          Gets the test object method to record.
 java.lang.ObjectgetParam(int position)
          Gets the argument at the specified position.
 java.util.VectorgetParams()
          Gets the arguments to the test object method call.
 intgetParamsCount()
          Gets the number of arguments to the test object method call.
 intgetQTMode()
          Gets the UFT send mode matching this record mode.
static RecordMessagegetRecordMessageInstance()
          Outputs debug information.
static RecordMessagegetRecordMessageInstance(java.lang.Object subject, java.lang.String vbCommand, java.lang.String[] params, AgentRecordMode mode)
          Creates a message for recording.
static RecordMessagegetRecordMessageInstance(java.lang.Object subject, java.lang.String vbCommand, java.lang.String[] params, AgentRecordMode mode, int time)
          Creates a message for delayed recording and sets the timeout.
 AgentRecordModegetSendMode()
          Gets the recording mode.
 java.lang.ObjectgetSubject()
          Gets the object whose event is being recorded.
 ObjectCSgetSubjectCS()
          Gets the support class for the object whose event is being recorded.
 intgetTimeout()
          Gets the timeout for delayed recording.
 voidsetCommand(java.lang.String command)
          Sets the test object method.
 voidsetSendMode(AgentRecordMode mode)
          Sets the recording mode.
 voidsetTimeout(int timeout)
          Sets the timeout for delayed recording.
 java.lang.StringtoString()
          Returns a string representation of the object.
 

 

Constructor Detail

RecordMessage

protected RecordMessage()
Method Detail

getRecordMessageInstance

public static RecordMessage getRecordMessageInstance()
Outputs debug information. If debugging, outputs name of new message. If stack debug is active, outputs the stack trace.

Returns:
The new RecordMessage.

getRecordMessageInstance

public static RecordMessage getRecordMessageInstance(java.lang.Object subject,
 java.lang.String vbCommand,
 java.lang.String[] params,
                                                     AgentRecordMode mode)
Creates a message for recording.

Parameters:
subject - The object whose event is to be recorded.
vbCommand - The step command, generally a test object method.
params - The vbCommand method arguments.
mode - A constant defined in the AgentRecordMode class, for example, NORMAL_RECORD, TIMER_RECORD, and so on.

getRecordMessageInstance

public static RecordMessage getRecordMessageInstance(java.lang.Object subject,
 java.lang.String vbCommand,
 java.lang.String[] params,
                                                     AgentRecordMode mode,
 int time)
Creates a message for delayed recording and sets the timeout.

Parameters:
subject - The message subject.
vbCommand - The step command, generally a test object method.
params - The vbCommand method arguments.
mode - A constant defined in the AgentRecordMode class, for example, TIMER_RECORD.
time - The delay time before recording.

setCommand

public void setCommand(java.lang.String command)
Sets the test object method.

Parameters:
command - The method, for example, Click.

getSubject

public java.lang.Object getSubject()
Gets the object whose event is being recorded.


getSubjectCS

public ObjectCS getSubjectCS()
Gets the support class for the object whose event is being recorded.


getCommand

public java.lang.String getCommand()
Gets the test object method to record.


getParamsCount

public int getParamsCount()
Gets the number of arguments to the test object method call.


getParam

public java.lang.Object getParam(int position)
Gets the argument at the specified position. The position is 0-based.


getParams

public java.util.Vector getParams()
Gets the arguments to the test object method call.


addParam

public RecordMessage addParam(int position)
Adds an argument to the test object method call at the specified position.


addParam

public RecordMessage addParam(java.lang.String s)
Adds a string argument to the test object method call at the specified position.


addParam

public RecordMessage addParam(ConstantParam constant)
Adds a ConstantParam argument to the test object method call at the specified position.


toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object

setSendMode

public void setSendMode(AgentRecordMode mode)
Sets the recording mode.

Parameters:
mode - A constant defined in the AgentRecordMode class, for example, NORMAL_RECORD, TIMER_RECORD, and so on.

setTimeout

public void setTimeout(int timeout)
Sets the timeout for delayed recording.


getTimeout

public int getTimeout()
Gets the timeout for delayed recording.


getSendMode

public AgentRecordMode getSendMode()
Gets the recording mode.

Returns:
A value defined in the AgentRecordMode class, like NORMAL_RECORD, TIMER_RECORD, and so on.

getQTMode

public int getQTMode()
Gets the UFT send mode matching this record mode.