public interface Result
See the
ScriptEnvironment
interface for general background information about this API.
Modifier and Type | Method and Description |
---|---|
SimulatedActionInfo |
createSimulatedActionInfo()
Factory method that creates a new instance of a
SimulatedActionInfo
object. |
SimulatedTargetInfo |
createSimulatedTargetInfo()
Factory method that creates a new instance of a
SimulatedTargetInfo
object. |
SimulatedTransactionInfo |
createSimulatedTransactionInfo()
Factory method that creates a new instance of a
SimulatedTransactionInfo
object. |
void |
postMessage(ResultLevel level,
java.lang.String titleText)
Inserts a custom event (message) into the Result object with the given
text.
|
void |
postMessage(ResultLevel level,
java.lang.String titleText,
java.lang.String detailsText)
Inserts a custom event (message) with details text into the Result object.
|
void |
recordActionCompletion(SimulatedTargetInfo simulatedTargetInfo,
SimulatedActionInfo simulatedActionInfo)
Records the completion of a simulated Action (Message) into the Result.
|
void |
recordTransactionCompletion(SimulatedTransactionInfo simulatedTransactionInfo)
Records the completion of a simulated Transaction that was created by
the
recordTransactionStart method. |
void |
recordTransactionStart(SimulatedTransactionInfo simulatedTransactionInfo)
Records the start of a simulated Transaction into the Result.
|
void postMessage(ResultLevel level, java.lang.String titleText) throws ScriptEnvironmentException
level
- The level of the message (error, info, statistics, verbose).titleText
- The message text.ScriptEnvironmentException
void postMessage(ResultLevel level, java.lang.String titleText, java.lang.String detailsText) throws ScriptEnvironmentException
level
- The level of the message (error, info, statistics, verbose).titleText
- The message text (title).detailsText
- The details text, that will be expandable as "details"
in the Result Viewer.ScriptEnvironmentException
SimulatedTargetInfo createSimulatedTargetInfo()
SimulatedTargetInfo
object. These API objects cannot be constructed directly, call this
method instead of doing a "new".SimulatedTargetInfo
object.SimulatedActionInfo createSimulatedActionInfo()
SimulatedActionInfo
object. These API objects cannot be constructed directly, call this
method instead of doing a "new".SimulatedActionInfo
object.SimulatedTransactionInfo createSimulatedTransactionInfo()
SimulatedTransactionInfo
object. These API objects cannot be constructed directly, call this
method instead of doing a "new".SimulatedTransactionInfo
object.void recordActionCompletion(SimulatedTargetInfo simulatedTargetInfo, SimulatedActionInfo simulatedActionInfo) throws ScriptEnvironmentException
This method does not actually cause any Message sending or receiving, it is used to record such activity when it is done in some other way other than via a standard Message.
This function has two parameters that describe the simulated Message and it's simulated Target. The simulated Target takes the place of the Target object that a standard Message would have.
It assumed that when this method is called the action has already been completed. (There are not separate "start" and "end" calls.)
simulatedTargetInfo
- A SimulatedTargetInfo
object that contains information about the
simulated Target for the Action. The input
object is no longer used or needed once this
call returns.simulatedActionInfo
- A SimulatedActionInfo
object that contains information about the
simulated Action to be recorded. The input
object is no longer used or needed once this
call returns.ScriptEnvironmentException
void recordTransactionStart(SimulatedTransactionInfo simulatedTransactionInfo) throws ScriptEnvironmentException
The Transaction will be empty unless simulated actions are recorded
inside of it using the recordActionCompletion
method,
and/or nested Transactions are created inside of it using this method.
Code that is adding simulated actions to the Result can also create Transactions and place the actions inside of those Transactions, to control how things appear and how statistics are computed in the Result.
simulatedTransactionInfo
- A SimulatedTransactionInfo
object that contains information about the
simulated Transaction being started.
The input object is no longer used or
needed once this call returns.ScriptEnvironmentException
void recordTransactionCompletion(SimulatedTransactionInfo simulatedTransactionInfo) throws ScriptEnvironmentException
recordTransactionStart
method. No more items may be
created inside of a Transaction once it has completed.simulatedTransactionInfo
- A SimulatedTransactionInfo
object that contains information about the
simulated Transaction being completed.
The input object is no longer used or
needed once this call returns.ScriptEnvironmentException