raccoon.api.eai.uitest
Interface IUnitRecorder

All Known Implementing Classes:
TibrvRecorder

public interface IUnitRecorder

A message recorder for a MOM.

Since:
Raccoon v0.7
Version:
$Id: IUnitRecorder.java,v 1.1 2004/08/08 20:25:56 crouvrais Exp $
Author:
Cedric ROUVRAIS

Field Summary
static java.lang.String RECORDING_CHANNEL
          The name of the property assigned to the recording channels.
 
Method Summary
 void addRecordingChannel(ComponentFile pRecordingChannel)
          Adds a new recording channel to the list of current recording channels.
 long getNbOfMsgsRecorded()
          The number of messages recorded.
 java.util.Map getRecordedMsgs()
          Retrieves all the retrieved messages during the recording process.
 int getRecorderId()
          The recorder id, valid only in UiTest scenario.
 java.util.ArrayList getRecordingChannels()
          The list of channels that are being monitored.
 boolean isRecording()
          State of the recorder.
 IMessage loadMessage(org.xml.sax.InputSource pSource)
          Converts the contents of an XML input source into a valid message.
 IComparator newComparator()
          Creates a message comparator for this recorder.
 void setRecorderId(int pRecorderId)
          Assigns the id of this recorder within the contexte of an UiTest scenario.
 void setRecordingChannels(java.util.ArrayList pRecordingChannels)
          Sets the channels from which to record events.
 int startRecording()
          Starts the recorder.
 long stopRecording()
          Stops the recorder.
 

Field Detail

RECORDING_CHANNEL

static final java.lang.String RECORDING_CHANNEL
The name of the property assigned to the recording channels. See setRecordingChannels(java.util.ArrayList), getRecordingChannels() and addRecordingChannel(raccoon.core.uitest.data.ComponentFile)

See Also:
Constant Field Values
Method Detail

isRecording

boolean isRecording()
State of the recorder.

Returns:
true if the recorder is still recording.

startRecording

int startRecording()
                   throws RaccoonException
Starts the recorder.

Returns:
the number of monitored topics.
Throws:
RaccoonException - if the recorder isn't able to start recording.

stopRecording

long stopRecording()
                   throws RaccoonException
Stops the recorder.

Returns:
the number of messages recorded by this recorder.
Throws:
RaccoonException - if this recorder was unable to stop one or more listeners.

getNbOfMsgsRecorded

long getNbOfMsgsRecorded()
The number of messages recorded.

Returns:
the number of messages recorded by this system.

setRecordingChannels

void setRecordingChannels(java.util.ArrayList pRecordingChannels)
                          throws RaccoonException,
                                 java.lang.IllegalArgumentException
Sets the channels from which to record events.

Parameters:
pRecordingChannels - the channels.
Throws:
RaccoonException - if this component is already running: the component can't be changed. Error code is ErrorCodes.COMPONENT_INITIALISED
java.lang.IllegalArgumentException - if the parameter is null, the message is obtained via MsgHelper.formatNullParamter(java.lang.String, java.lang.Class)

getRecordingChannels

java.util.ArrayList getRecordingChannels()
The list of channels that are being monitored.

Returns:
an ArrayList of ComponentFile.

addRecordingChannel

void addRecordingChannel(ComponentFile pRecordingChannel)
                         throws RaccoonException,
                                java.lang.IllegalArgumentException
Adds a new recording channel to the list of current recording channels.

Parameters:
pRecordingChannel - the new recording channel to add.
Throws:
RaccoonException - if this component is already running: the component can't be changed. Error code is ErrorCodes.COMPONENT_INITIALISED
java.lang.IllegalArgumentException - if the parameter is null, the message is obtained via MsgHelper.formatNullParamter(java.lang.String, java.lang.Class)

getRecordedMsgs

java.util.Map getRecordedMsgs()
                              throws java.lang.IllegalStateException
Retrieves all the retrieved messages during the recording process. The map is defined as follows:

Returns:
the list of the messages.
Throws:
java.lang.IllegalStateException - if this recorder has never recorder any messages.

loadMessage

IMessage loadMessage(org.xml.sax.InputSource pSource)
                     throws RaccoonException
Converts the contents of an XML input source into a valid message.

Parameters:
pSource - the xml input source (usually generated by this recorder)
Returns:
the message corresponding to the input source.
Throws:
RaccoonException - if the xml input source is invalid.

getRecorderId

int getRecorderId()
The recorder id, valid only in UiTest scenario.

In a none test scenario the value returned should be zero, otherwise it should indicate the ID of this recorder.

Returns:
the recorder id, should be unique and none zero.

setRecorderId

void setRecorderId(int pRecorderId)
Assigns the id of this recorder within the contexte of an UiTest scenario.

Parameters:
pRecorderId - the id of this recorder.

newComparator

IComparator newComparator()
Creates a message comparator for this recorder.

Returns:
the comparator


Copyright null null. All Rights Reserved.