public class EmbeddedHookSTAFHelper extends STAFHelper
Modifier and Type | Field and Description |
---|---|
(package private) TestRecordData |
_data |
(package private) boolean |
_engineRun |
embedQUEUE, embedSEM, eventsToReset, getQueueMessageField, LOCAL_MACHINE, no_staf_handles, queue, ROBOTJ_EVENT_DISPATCH, ROBOTJ_EVENT_DONE, ROBOTJ_EVENT_READY, ROBOTJ_EVENT_RESULTS, ROBOTJ_EVENT_RUNNING, ROBOTJ_EVENT_SHUTDOWN, ROBOTJ_EVENT_START, SAFS_ABBOT_PROCESS, SAFS_ABBOT_PROCESS_ID, SAFS_APPMAP_SERVICE, SAFS_CLASSIC_PROCESS, SAFS_CLASSIC_PROCESS_ID, SAFS_CYCLE_TRD, SAFS_EVENT_DISPATCH, SAFS_EVENT_DONE, SAFS_EVENT_READY, SAFS_EVENT_RESULTS, SAFS_EVENT_RUNNING, SAFS_EVENT_SHUTDOWN, SAFS_EVENT_START, SAFS_GENERIC_PROCESS, SAFS_GENERIC_PROCESS_ID, SAFS_HOOK_TRD, SAFS_HOOK_TRD_MUTEX, SAFS_INPUT_PROCESS, SAFS_INPUT_SERVICE, SAFS_LOGGING_SERVICE, SAFS_LOGGINGLOG_SERVICE, SAFS_ROBOTJ_PROCESS, SAFS_ROBOTJ_PROCESS_ID, SAFS_SAFSLOGS_PROCESS, SAFS_SAFSMAPS_PROCESS, SAFS_SAFSVARS_PROCESS, SAFS_STEP_TRD, SAFS_SUITE_TRD, SAFS_VAR_APPMAPNAME, SAFS_VAR_BENCHDIRECTORY, SAFS_VAR_COMMANDLINEBREAKPOINT, SAFS_VAR_DATAPOOLDIRECTORY, SAFS_VAR_DIFDIRECTORY, SAFS_VAR_FAC, SAFS_VAR_FILENAME, SAFS_VAR_GLOBAL_LAST_LOG_DESC, SAFS_VAR_GLOBAL_LAST_LOG_MSG, SAFS_VAR_GLOBAL_LAST_LOG_TYPE, SAFS_VAR_INPUTRECORD, SAFS_VAR_LINENUMBER, SAFS_VAR_LOGSDIRECTORY, SAFS_VAR_PROJECTDIRECTORY, SAFS_VAR_ROOTVERIFYDIRECTORY, SAFS_VAR_RUNTIMEREPOSITORY, SAFS_VAR_SAFSACTIVECYCLE, SAFS_VAR_SAFSACTIVESTEP, SAFS_VAR_SAFSACTIVESUITE, SAFS_VAR_SECSWAITFORCOMPONENT, SAFS_VAR_SECSWAITFORWINDOW, SAFS_VAR_SEPARATOR, SAFS_VAR_STATUSCODE, SAFS_VAR_STATUSINFO, SAFS_VAR_SYSTEMUSERID, SAFS_VAR_TESTDIRECTORY, SAFS_VAR_TESTLEVEL, SAFS_VARIABLE_SERVICE, sem, STAF_DELAY_SERVICE, STAF_GLOBALVARS_VERSION, STAF_SERVICELOADER_V2, STAF_SERVICELOADER_V3, STAF_VARIABLE_SERVICE, stafCompatible, STAFQueueMessageClass
Constructor and Description |
---|
EmbeddedHookSTAFHelper() |
EmbeddedHookSTAFHelper(java.lang.String processName) |
Modifier and Type | Method and Description |
---|---|
protected TestRecordData |
_getData() |
java.lang.String |
getNextHookTestEvent(java.lang.String process_name,
java.lang.String trd_name)
The "engine" waits until the _engineRun flag is true and then begins execution.
|
void |
getSAFSTestRecordData(java.lang.String trd_root,
TestRecordData trd)
Get the SAFSVARS Test Record Data into the given trd_root.
|
java.lang.String |
getSTAFEnv(java.lang.String env)
getSTAFEnv
returns string value or an empty string.
|
com.ibm.staf.STAFResult |
localStartProcess(java.lang.String appname,
java.lang.String workdir)
Cannot use STAF to run a process when STAF is not running!
|
int |
postNextHookTestEvent(java.lang.String process_name,
java.lang.String trd_root,
TestRecordData trd)
Sets _engineRun = true to kickoff the "engine" execution.
|
void |
setHookTestResultsWTimeout(java.lang.String process_name,
long timeoutseconds)
Prevents the posting of STAF EVENTS (RESULTS and DONE) events since everything
is local in the same JVM process.
|
void |
setSAFSTestRecordData(java.lang.String trd_root,
TestRecordData trd)
Sets the local driver/engine shared _data object and sets the TRD_HOOK data per the superclass.
|
addService, addServiceSAFSVARS, configEmbeddedServices, delay, getAppMapItem, getAppMapItem, getAppMapNames, getEventDispatchString, getEventDoneString, getEventReadyString, getEventResultsString, getEventRunningString, getEventShutdownString, getEventStartString, getHandle, getHandleNumber, getLogName, getMachine, getNextTestEvent, getProcessName, getQueueMessage, getRunningEngineNames, getServiceEvents, getSTAFVariable, getSTAFVersion, getSTAFVersionString, getVariable, initialize, isInitialized, isOnlyShutdownPosted, isSAFSINPUTAvailable, isSAFSLOGSAvailable, isSAFSMAPSAvailable, isSAFSVARSAvailable, isServiceAvailable, isServiceLibraryRunning, isToolAvailable, lentagValue, localPing, logMessage, postEvent, pulseEvent, reinstateShutdownHook, releaseSTAFMutex, removeService, removeShutdownHook, resetEvent, resetEvents, resetHookEvents, sendQueueMessage, setHookTestResults, setLocalMachine, setMachine, setSTAFVariable, setTestResults, setVariable, shutDown, shutdownEmbeddedServices, startEmbeddedQueueService, startProcess, submit, submit2, submit2ForFormatUnchangedService, submit2WithVar, unRegister, waitEvent, waitEventMillis, waitEventWaiter, waitSTAFMutex
TestRecordData _data
boolean _engineRun
public EmbeddedHookSTAFHelper()
public EmbeddedHookSTAFHelper(java.lang.String processName) throws SAFSSTAFRegistrationException
SAFSSTAFRegistrationException
protected TestRecordData _getData()
public java.lang.String getNextHookTestEvent(java.lang.String process_name, java.lang.String trd_name) throws SAFSException
getNextHookTestEvent
in class STAFHelper
process_name
- -- the STAF-registered name of the engine involved.trd_name
- -- the TestRecordData SAFSVARS storage root, normally "SAFS/HOOK/".SAFSException
- if staf has a problemSTAFHelper.getNextHookTestEvent(java.lang.String, java.lang.String)
public int postNextHookTestEvent(java.lang.String process_name, java.lang.String trd_root, TestRecordData trd) throws SAFSException
The "driver" then waits for _engineRun flag to change to indicate the "engine" is finished.
postNextHookTestEvent
in class STAFHelper
process_name
- -- the STAF-registered name of the engine to dispatch.trd_root
- -- the TestRecordData SAFSVARS storage root, normally "SAFS/HOOK/".trd
- -- the TestRecordData to place into SAFSVARS for execution by the engine.
SAFSException
- if staf has a problemSTAFHelper.postNextHookTestEvent(java.lang.String, java.lang.String, org.safs.TestRecordData)
public void setSAFSTestRecordData(java.lang.String trd_root, TestRecordData trd) throws SAFSException
setSAFSTestRecordData
in interface CoreInterface
setSAFSTestRecordData
in class STAFHelper
SAFSException
STAFHelper.setSAFSTestRecordData(java.lang.String, org.safs.TestRecordData)
public void getSAFSTestRecordData(java.lang.String trd_root, TestRecordData trd)
STAFHelper
getSAFSTestRecordData
in interface CoreInterface
getSAFSTestRecordData
in class STAFHelper
public void setHookTestResultsWTimeout(java.lang.String process_name, long timeoutseconds) throws SAFSException
Sets _engineRun = false to indicate the "engine" has finished processing the record and allow the "driver" to evaluate the results.
setHookTestResultsWTimeout
in class STAFHelper
SAFSException
- if staf has a problemSTAFHelper.setHookTestResultsWTimeout(java.lang.String, long)
public java.lang.String getSTAFEnv(java.lang.String env)
STAFHelper
getSTAFEnv
in class STAFHelper
public com.ibm.staf.STAFResult localStartProcess(java.lang.String appname, java.lang.String workdir) throws java.io.IOException
localStartProcess
in class STAFHelper
machine
- String, the name of the ("local") machine where the application will runappname
- String, the name of application to runworkdir
- String, the directory serves as working directory for applicationjava.io.IOException
Copyright © SAS Institute. All Rights Reserved.