TPTP 4.1.0 Testing Tools Project
Public API Specification

org.eclipse.hyades.execution.recorder
Class Recorder

java.lang.Object
  extended byorg.eclipse.hyades.execution.recorder.Recorder

public class Recorder
extends java.lang.Object

Contains all information and/or instantiated objects related to a recorder This object is managed by RecorderFactory and is automatically registred with the factory upon intial creation. Attempting to instantiate an object with a given ID more than once will result in an exception


Field Summary
protected  IRecorderDataProcessor dataProcessor
          the IRecorderDataProcessor which handles incoming data from the Agent Controller
protected  RecorderEnvironmentAdapter environmentAdapter
          environment Adapter which may append the execution environment's classpath, etc.
protected  java.lang.String id
          the recorder's ID.
 
Constructor Summary
Recorder(java.lang.String recorderID)
           
Recorder(java.lang.String recorderID, IRecorderDataProcessor dataProcessor, RecorderEnvironmentAdapter agentEnvironmentAdapter, RecorderExecutableObjectAdapter objectAdapter)
          Deprecated. Generic Recorder Framework will create the data processor & agent adapters. Use Recorder(String)
 
Method Summary
 boolean annotateRecording(java.lang.String msg)
          Mechanism to send a message to the recorder agent, presumably to add additional user-directed information to the recording The interpretation of this message is left up to the consuming Recorder
 RecorderEnvironmentAdapter getAgentEnvironmentAdapter()
          returns the recorders environmen adapter
 java.lang.String getApplicationAdapterID()
          returns the ID of the recorder application adapter to be used with this recorder.
 java.lang.String getConfigParams()
          gets the recorders configuration parameter string
 IRecorderDataProcessor getDataProcessor()
          returns the recorders IRecorderDataProcessor
 RecorderExecutableObjectAdapter getExecutableObjectAdapter()
          returns a reference to the recorders RecorderExecutableObjectAdapter
 java.lang.String getId()
          returns the recorders ID.
 java.lang.String getRecordingPath()
          returns the path for the resulting trace file (set at runtime)
 java.lang.String getScriptgenID()
          returns the ID of the registred script generator which is to be used with this recorder for the current recording session.
 java.lang.String getTestPath()
          returns the path for the test which will be generated at the conclusion of this recording
 boolean isActive()
          returns true if this recorder is currently active
 org.eclipse.hyades.internal.execution.recorder.local.RecorderClient Record()
          Deprecated. - highly advisable to pass a IProgressMonitor
 org.eclipse.hyades.internal.execution.recorder.local.RecorderClient Record(org.eclipse.core.runtime.IProgressMonitor monitor)
          called to initiate a recording with this recording.
 void setActive(boolean isActive)
          called to modify the active status of this recorder
 void setApplicationAdapterID(java.lang.String appAdapterID)
          sets the ID of the application adapter that will be used with this recorder.
 void setConfigParams(java.lang.String string)
          Sets the recoders configuration parameter String which will be passed to the recorder's agent object.
 void setRecordingPath(java.lang.String recPath)
          sets the path for the trace file generated by the current recording session.
 void setScriptgenID(java.lang.String scriptGenID)
          sets the ID of the script generator to be used for this recording session.
 void setTestPath(java.lang.String string)
          sets teh path for the test which will be generated at the conclusion of the current recording session.
 void stopRecorder()
          called to stop a recorder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected java.lang.String id
the recorder's ID.


environmentAdapter

protected RecorderEnvironmentAdapter environmentAdapter
environment Adapter which may append the execution environment's classpath, etc.


dataProcessor

protected IRecorderDataProcessor dataProcessor
the IRecorderDataProcessor which handles incoming data from the Agent Controller

See Also:
IRecorderDataProcessor
Constructor Detail

Recorder

public Recorder(java.lang.String recorderID,
                IRecorderDataProcessor dataProcessor,
                RecorderEnvironmentAdapter agentEnvironmentAdapter,
                RecorderExecutableObjectAdapter objectAdapter)
         throws RecorderException
Deprecated. Generic Recorder Framework will create the data processor & agent adapters. Use Recorder(String)

This contructor should only be called one time per recorder per eclipse session. Upon construction, the recorder is automatically registered with the RecorderFactory. Subsequent calls to this contructor will result in a RecorderException.

Throws:
RecorderException

Recorder

public Recorder(java.lang.String recorderID)
         throws RecorderException
Method Detail

getAgentEnvironmentAdapter

public RecorderEnvironmentAdapter getAgentEnvironmentAdapter()
returns the recorders environmen adapter

Returns:
See Also:
RecorderEnvironmentAdapter

getDataProcessor

public IRecorderDataProcessor getDataProcessor()
returns the recorders IRecorderDataProcessor

See Also:
IRecorderDataProcessor

getId

public java.lang.String getId()
returns the recorders ID. recorder ID's must be unique.


Record

public org.eclipse.hyades.internal.execution.recorder.local.RecorderClient Record(org.eclipse.core.runtime.IProgressMonitor monitor)
                                                                           throws RecorderException
called to initiate a recording with this recording. Before this method is called, all valid information for this recording session must be set. For example. recorder.setConfigParams("port,450"); recorder.setRecordingPath("/test/recordings/foo.rec"); recorder.setScriptgenID("org.eclipse.hyades.execution.testgen.TestGenGenerator.HTTPGenerator"); recorder.setTestPath("/test/tests/bar.testsuite"); recorder.setApplicationAdapterID("org.eclipse.hyades.execution.recorder.RecorderApplication.InternetExplorer"); recorder.Record();

Throws:
RecorderException

Record

public org.eclipse.hyades.internal.execution.recorder.local.RecorderClient Record()
                                                                           throws RecorderException
Deprecated. - highly advisable to pass a IProgressMonitor

called to initiate a recording with this recording. Before this method is called, all valid information for this recording session must be set. For example. recorder.setConfigParams("port,450"); recorder.setRecordingPath("/test/recordings/foo.rec"); recorder.setScriptgenID("org.eclipse.hyades.execution.testgen.TestGenGenerator.HTTPGenerator"); recorder.setTestPath("/test/tests/bar.testsuite"); recorder.setApplicationAdapterID("org.eclipse.hyades.execution.recorder.RecorderApplication.InternetExplorer"); recorder.Record();

Throws:
RecorderException

getConfigParams

public java.lang.String getConfigParams()
gets the recorders configuration parameter string


setConfigParams

public void setConfigParams(java.lang.String string)
Sets the recoders configuration parameter String which will be passed to the recorder's agent object. This string should be a semi-colon delimited collection of comma delimited name-value pairs (i.e. host,localhost;port,450)


getExecutableObjectAdapter

public RecorderExecutableObjectAdapter getExecutableObjectAdapter()
returns a reference to the recorders RecorderExecutableObjectAdapter

Returns:
RecorderExecutableObjectAdapter

getApplicationAdapterID

public java.lang.String getApplicationAdapterID()
returns the ID of the recorder application adapter to be used with this recorder.


setApplicationAdapterID

public void setApplicationAdapterID(java.lang.String appAdapterID)
sets the ID of the application adapter that will be used with this recorder. (set at runtime)


getRecordingPath

public java.lang.String getRecordingPath()
returns the path for the resulting trace file (set at runtime)


getScriptgenID

public java.lang.String getScriptgenID()
returns the ID of the registred script generator which is to be used with this recorder for the current recording session. This parameter is set per recording at runtime.

Returns:

setScriptgenID

public void setScriptgenID(java.lang.String scriptGenID)
sets the ID of the script generator to be used for this recording session.


setRecordingPath

public void setRecordingPath(java.lang.String recPath)
sets the path for the trace file generated by the current recording session. this value is set per recording at runtime.


getTestPath

public java.lang.String getTestPath()
returns the path for the test which will be generated at the conclusion of this recording

Returns:
String

setTestPath

public void setTestPath(java.lang.String string)
sets teh path for the test which will be generated at the conclusion of the current recording session. this value is set per recording session at runtime

Parameters:
string -

stopRecorder

public void stopRecorder()
called to stop a recorder. Calling this method will result in termination of the recording and closing of any application that was started by the recorder framework.


isActive

public boolean isActive()
returns true if this recorder is currently active

Returns:
boolean

setActive

public void setActive(boolean isActive)
called to modify the active status of this recorder


annotateRecording

public boolean annotateRecording(java.lang.String msg)
Mechanism to send a message to the recorder agent, presumably to add additional user-directed information to the recording The interpretation of this message is left up to the consuming Recorder

Parameters:
msg -
Returns:
- true if message was able to be sent to agent (not necessarily interpreted, however) - false if something prevented sending the message

TPTP 4.1.0 Testing Tools Project
Public API Specification