org.safs.abbot
Class AbbotJavaHook

java.lang.Object
  extended by org.safs.JavaHook
      extended by org.safs.abbot.AbbotJavaHook

public class AbbotJavaHook
extends JavaHook

This class is our STAF-enabled JavaHook for the "SAFS/Abbot" Engine. This is the class that registers with STAF and responds to the STAF-based SAFS Engine protocol defined at http://sourceforge.net/docman/display_doc.php?docid=17505&group_id=56751

The STAF name predefined for this Abbot Engine is "SAFS/Abbot".

As of this writing, this hook uses standard org.safs.LogUtilities. The TestStepProcessor is a new "standard" org.safs.JVMAgentTestStepProcessor.

The SAFS/Abbot engine does require Abbot-specific implementations of

Assuming everything is properly CLASSPATHed the Engine can be launched simply with:

See Also:
AbbotGUIUtilities, ATestRecordHelper, JVMAgentTestStepProcessor

Field Summary
static java.lang.String ABBOT_COMMANDS
          Our predefined STAF process name: "SAFS/Abbot"
 
Fields inherited from class org.safs.JavaHook
data, DEBUG_MESSAGE, errorText, FAILED_MESSAGE, FAILED_OK_MESSAGE, GENERIC_ERROR, GENERIC_MESSAGE, helper, log, PASSED_MESSAGE, PAUSE_EXECUTION, process_name, processor, REQUEST_PROCEED_TESTING, REQUEST_USER_STOPPED_SCRIPT_REQUEST, RUNNING_EXECUTION, semaphore_name, SHUTDOWN_RECORD, STAF_ERROR, STEP_EXECUTION, STEPPING_EXECUTION, trd_name, utils, WARNING_MESSAGE, WARNING_OK_MESSAGE
 
Constructor Summary
AbbotJavaHook()
          No-arg constructor for AbbotJavaHook Simply calls the super()
AbbotJavaHook(java.lang.String process_name)
          Constructor for AbbotJavaHook Simply calls super(process_name)
AbbotJavaHook(java.lang.String process_name, LogUtilities logs)
          Constructor for AbbotJavaHook Simply calls super(process_name, logs)
AbbotJavaHook(java.lang.String process_name, java.lang.String trd_name)
          Constructor for AbbotJavaHook Simply calls super(process_name, trd_name)
AbbotJavaHook(java.lang.String process_name, java.lang.String trd_name, LogUtilities logs)
          Constructor for AbbotJavaHook Simply calls super(process_name, trd_name, logs)
AbbotJavaHook(java.lang.String process_name, java.lang.String trd_name, LogUtilities logs, TestRecordHelper trd_data, DDGUIUtilities gui_utils, ProcessRequest aprocessor)
          Advanced Constructor for AbbotJavaHook.
 
Method Summary
 DDGUIUtilities getGUIUtilities()
          Use this method to retrieve/create the current/default DDGUIUtilities instance.
 LogUtilities getLogUtilities()
          Use this method to retrieve/create the current/default LogUtilities instance.
 ProcessRequest getRequestProcessor()
          Use this method to retrieve/create the current/default ProcessRequest instance.
 TestRecordHelper getTRDData()
          Use this method to retrieve/create the current/default TestRecordHelper instance.
static void main(java.lang.String[] args)
          Launches a default instance of the SAFS/Abbot engine.
 
Methods inherited from class org.safs.JavaHook
allowSystemExit, evaluateRuntimeException, getHelper, getProcessName, getSemaphoreName, getTRDName, hook_shutdown, setGUIUtilities, setHelper, setLogUtilities, setProcessName, setRequestProcessor, setSemaphoreName, setTRDData, setTRDName, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ABBOT_COMMANDS

public static final java.lang.String ABBOT_COMMANDS
Our predefined STAF process name: "SAFS/Abbot"

See Also:
Constant Field Values
Constructor Detail

AbbotJavaHook

public AbbotJavaHook()
No-arg constructor for AbbotJavaHook Simply calls the super()


AbbotJavaHook

public AbbotJavaHook(java.lang.String process_name)
Constructor for AbbotJavaHook Simply calls super(process_name)

Parameters:
process_name - the ID to use when registering with STAF. Normally this would be our predefined name "SAFS/Abbot".

AbbotJavaHook

public AbbotJavaHook(java.lang.String process_name,
                     LogUtilities logs)
Constructor for AbbotJavaHook Simply calls super(process_name, logs)

Parameters:
process_name - the ID to use when registering with STAF. Normally this would be our predefined name "SAFS/Abbot".
logs - the LogUtilities to be used by the Engine. Currently we can use the default org.safs.LogUtilities
See Also:
org.safs.LogUtilites

AbbotJavaHook

public AbbotJavaHook(java.lang.String process_name,
                     java.lang.String trd_name)
Constructor for AbbotJavaHook Simply calls super(process_name, trd_name)

Parameters:
process_name - the ID to use when registering with STAF. Normally this would be our predefined name "SAFS/Abbot".
trd_name - -- The root name for specific TestRecordData to reference in STAF. This should typically be STAFHelper.SAFS_HOOK_TRD which is used by default.
See Also:
STAFHelper.SAFS_HOOK_TRD

AbbotJavaHook

public AbbotJavaHook(java.lang.String process_name,
                     java.lang.String trd_name,
                     LogUtilities logs)
Constructor for AbbotJavaHook Simply calls super(process_name, trd_name, logs)

Parameters:
process_name - the ID to use when registering with STAF. Normally this would be our predefined name "SAFS/Abbot".
trd_name - -- The root name for specific TestRecordData to reference in STAF. This should typically be STAFHelper.SAFS_HOOK_TRD which is used by default.
logs - the LogUtilities to be used by the Engine. Currently we can use the default org.safs.LogUtilities
See Also:
STAFHelper.SAFS_HOOK_TRD, org.safs.LogUtilites

AbbotJavaHook

public AbbotJavaHook(java.lang.String process_name,
                     java.lang.String trd_name,
                     LogUtilities logs,
                     TestRecordHelper trd_data,
                     DDGUIUtilities gui_utils,
                     ProcessRequest aprocessor)
Advanced Constructor for AbbotJavaHook. Simply calls super(process_name, trd_name, logs, trd_data, gui_utils, aprocessor)

Parameters:
process_name - the ID to use when registering with STAF. Normally this would be our predefined name "SAFS/Abbot".
trd_name - -- The root name for specific TestRecordData to reference in STAF. This should typically be STAFHelper.SAFS_HOOK_TRD which is used by default.
logs - the LogUtilities to be used by the Engine. Currently we can use the default org.safs.LogUtilities
trd_data - -- ATestRecordHelper to hold TestRecordData. The Abbot engine expects an instance of ATestRecordHelper.
gui_utils - -- AbbotGuiUtilities the hook will use for handling components. The Abbot engine expects an instance of AbbotGuiUtilities.
aprocessor - -- ProcessRequest object the hook will use for routing records. The Abbot engine uses the standard ProcessRequest class and a standard TestStepProcessor.
See Also:
STAFHelper.SAFS_HOOK_TRD, org.safs.LogUtilites, ATestRecordHelper, AbbotGUIUtilities, ProcessRequest, TestStepProcessor
Method Detail

getTRDData

public TestRecordHelper getTRDData()
Use this method to retrieve/create the current/default TestRecordHelper instance. If the TestRecordHelper has not been set this routine will instance a new org.safs.abbot.ATestRecordHelper and populate it with a STAFHelper via getHelper() and a DDGUIUtilities via getGUIUtilities. Note that the call to getGUIUtilities may force the instantiation of the default AbbotGuiUtilities if one has not already been set.

Note that there is a known circular execution between getTRDData and getGUIUtilities if neither was previously set. Each routine calls the other which may result in a second call to the other. This has not been a problem.

Specified by:
getTRDData in class JavaHook
Returns:
TestRecordHelper which should be an instanceof org.safs.abbot.ATestRecordHelper
See Also:
ATestRecordHelper, JavaHook.getHelper(), getGUIUtilities(), JavaHook.getTRDData()

getGUIUtilities

public DDGUIUtilities getGUIUtilities()
Use this method to retrieve/create the current/default DDGUIUtilities instance. If the DDGUIUtilities has not been set this routine will instance a new org.safs.abbot.AbbotGUIUtilities and populate it with a STAFHelper via getHelper() and a TestRecordHelper via getTRDData(). Note that the call to getTRDData() may force the instantiation of the default ATestRecordHelper if one has not already been set.

The AbbotGUIUtilities talk with our embedded proxies over a SAFS RMI bridge. The local RMI server (AServerImpl) is instanced if not already set.

Note that there is a known circular execution between getTRDData and getGUIUtilities if neither was previously set. Each routine calls the other which may result in a second call to the other. This has not been a problem.

Specified by:
getGUIUtilities in class JavaHook
Returns:
DDGUIUtilities which should be an instanceof org.safs.abbot.AbbotGUIUtilities.
See Also:
JavaHook.getGUIUtilities(), JavaHook.getHelper(), getTRDData(), AbbotGUIUtilities, AServerImpl

getLogUtilities

public LogUtilities getLogUtilities()
Use this method to retrieve/create the current/default LogUtilities instance. If the LogUtilities has not been set this routine will instance a new org.safs.LogUtilities.

Specified by:
getLogUtilities in class JavaHook
Returns:
LogUtilities which should be an instanceof org.safs.LogUtilities.
See Also:
JavaHook.getLogUtilities(), org.safs.LogUtilities

getRequestProcessor

public ProcessRequest getRequestProcessor()
Use this method to retrieve/create the current/default ProcessRequest instance. If the ProcessRequest has not been set this routine will instance a new org.safs.ProcessRequest and populate it with the LogUtilities via getLogUtilities(), a TestRecordHelper via getTRDData(), and a new TestStepProcessor. Note that the call to getTRDData() may force the instantiation of the default ATestRecordHelper if one has not already been set. A call to getLogUtilities() may also force the instantiation of the default LogUtilities if one has not already been set.

Specified by:
getRequestProcessor in class JavaHook
Returns:
ProcessRequest which should be an instanceof org.safs.ProcessRequest
See Also:
JavaHook.getRequestProcessor(), ProcessRequest, ATestRecordHelper, getTRDData(), getLogUtilities(), org.safs.LogUtilities, TestStepProcessor

main

public static void main(java.lang.String[] args)
Launches a default instance of the SAFS/Abbot engine. The "hook" is instanced and registered with STAF--which must already be running. The hook is started and will show up as "Ready" to SAFS Drivers once initialization is complete.

Assuming everything is properly CLASSPATHed, the default SAFS/Abbot Engine can be launched simply with: