public class ProcessRequest
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static int |
DEBUG_MESSAGE
Convenience for local referencing instead of referencing AbstractLogFacility.
|
protected static int |
FAILED_MESSAGE
Log MessageType for local referencing.
|
protected static int |
FAILED_OK_MESSAGE
Log MessageType for local referencing.
|
protected static int |
GENERIC_MESSAGE
Convenience for local referencing instead of referencing AbstractLogFacility.
|
protected boolean |
initialized
true if initializeProcessor has been called at least once.
|
protected LogUtilities |
log
LogUtilities to be used by this processor.
|
protected static int |
PASSED_MESSAGE
Log MessageType for local referencing.
|
protected boolean |
requesterReady
true if we have non-null objects where required
|
protected TestRecordHelper |
testRecordData
TestRecordData Helper subclass to be used by this processor.
|
protected static int |
WARNING_MESSAGE
Log MessageType for local referencing.
|
protected static int |
WARNING_OK_MESSAGE
Log MessageType for local referencing.
|
Constructor and Description |
---|
ProcessRequest()
Noop constructor.
|
ProcessRequest(TestRecordHelper testRecordData,
LogUtilities log)
Standard constructor allowing for default Driver Command and Test Step Processors.
|
ProcessRequest(TestRecordHelper testRecordData,
LogUtilities log,
Processor altDriverCommandsProcessor,
Processor altTestStepProcessor,
Processor altCustomDriverCommandsProcessor,
Processor altCustomTestStepProcessor)
Advanced constructor allowing for Driver Command and Test Step Processors different
from the those provided by default.
|
ProcessRequest(TestRecordHelper testRecordData,
LogUtilities log,
Processor altEngineCommandsProcessor,
Processor altDriverCommandsProcessor,
Processor altTestStepProcessor,
Processor altCustomEngineCommandsProcessor,
Processor altCustomDriverCommandsProcessor,
Processor altCustomTestStepProcessor)
Advanced constructor allowing for Engine, Driver, and Test Processors different
from the those provided by default.
|
ProcessRequest(TestRecordHelper testRecordData,
LogUtilities log,
java.util.Vector processorList)
Advanced constructor allowing for an alternate list of processors.
|
Modifier and Type | Method and Description |
---|---|
void |
addProcessor(Processor aprocessor)
Add a processor that is used instead of, or in addition to, the
normal core and custom processors.
|
void |
doRequest()
Process a dispatch event for handling an input record from a hook/driver.
|
Processor |
getCustomDriverCommandProcessor() |
Processor |
getCustomEngineCommandProcessor() |
Processor |
getCustomTestStepProcessor() |
Processor |
getDriverCommandProcessor() |
Processor |
getEngineCommandProcessor() |
LogUtilities |
getLogUtilities() |
TestRecordHelper |
getTestRecordData() |
Processor |
getTestStepProcessor() |
protected void |
initializeProcessor(Processor aprocessor)
Make sure the processor has a valid log.
|
void |
initializeRequester()
Force all necessary cross-initialization to occur prior to first use.
|
void |
setCustomDriverCommandProcessor(Processor aprocessor) |
void |
setCustomEngineCommandProcessor(Processor aprocessor) |
void |
setCustomTestStepProcessor(Processor aprocessor) |
void |
setDriverCommandProcessor(Processor aprocessor) |
void |
setEngineCommandProcessor(Processor aprocessor) |
void |
setLogUtilities(LogUtilities log) |
void |
setProcessorList(java.util.Vector processorList)
Set (or clear) any list of processors.
|
void |
setTestRecordData(TestRecordHelper testRecordData) |
void |
setTestStepProcessor(Processor aprocessor) |
protected void |
tryProcessor(Processor aprocessor)
Attempt execution of the current testRecordData.inputRecord.
|
protected static final int DEBUG_MESSAGE
protected static final int GENERIC_MESSAGE
protected static final int FAILED_MESSAGE
protected static final int FAILED_OK_MESSAGE
protected static final int PASSED_MESSAGE
protected static final int WARNING_MESSAGE
protected static final int WARNING_OK_MESSAGE
protected TestRecordHelper testRecordData
protected LogUtilities log
protected boolean requesterReady
protected boolean initialized
public ProcessRequest()
public ProcessRequest(TestRecordHelper testRecordData, LogUtilities log)
public ProcessRequest(TestRecordHelper testRecordData, LogUtilities log, Processor altDriverCommandsProcessor, Processor altTestStepProcessor, Processor altCustomDriverCommandsProcessor, Processor altCustomTestStepProcessor)
Note: null values can be used for any of the Processors to effectively disable the handling of that type of test record. For example, a null value passed in for 'altTestStepProcessor' effectively disables the processing of 'standard' Test Step Records. Other non-null Processors will still be called, however.
public ProcessRequest(TestRecordHelper testRecordData, LogUtilities log, Processor altEngineCommandsProcessor, Processor altDriverCommandsProcessor, Processor altTestStepProcessor, Processor altCustomEngineCommandsProcessor, Processor altCustomDriverCommandsProcessor, Processor altCustomTestStepProcessor)
Note: null values can be used for any of the Processors to effectively disable the handling of that type of test record. For example, a null value passed in for 'altTestStepProcessor' effectively disables the processing of 'standard' Test Step Records. Other non-null Processors will still be called, however.
public ProcessRequest(TestRecordHelper testRecordData, LogUtilities log, java.util.Vector processorList)
Note: null values will be set for standard processors to effectively disable their handling. Only those Processors in the provided processorList will be used.
processorList is a Vector list of Processors. It is the user's responsibility to ensure any non-null Vector contains elements that are valid subclasses of org.safs.Processor. As always, additional processors can be added to the list with the addProcessor method.
public Processor getEngineCommandProcessor()
public void setEngineCommandProcessor(Processor aprocessor)
public Processor getTestStepProcessor()
public void setTestStepProcessor(Processor aprocessor)
public Processor getDriverCommandProcessor()
public void setDriverCommandProcessor(Processor aprocessor)
public Processor getCustomEngineCommandProcessor()
public void setCustomEngineCommandProcessor(Processor aprocessor)
public Processor getCustomTestStepProcessor()
public void setCustomTestStepProcessor(Processor aprocessor)
public Processor getCustomDriverCommandProcessor()
public void setCustomDriverCommandProcessor(Processor aprocessor)
public TestRecordHelper getTestRecordData()
public void setTestRecordData(TestRecordHelper testRecordData)
public LogUtilities getLogUtilities()
public void setLogUtilities(LogUtilities log)
public void addProcessor(Processor aprocessor)
public void setProcessorList(java.util.Vector processorList)
processorList is a Vector list of Processors. It is the user's responsibility to ensure any non-null Vector contains elements that are valid subclasses of org.safs.Processor. As always, additional processors can be added to the list with the addProcessor method.
protected void initializeProcessor(Processor aprocessor)
aprocessor
- -- Processor to initializepublic void initializeRequester()
This method will be called at the first execution of doRequest if it has not already been called.
initializeProcessor
public void doRequest()
.doRequest first grabs the request (recordType), then routes it. What we are processing here is a input record which comes from test tables in the form of Driver Commands, Test Steps, or other input record typs.
Sample Test Table Input Records
==============================
C , Expressions, ON
T , Login , Password , SetTextValue , ^password
T , Login , Submit , Click
T , Error , Message , VerifyProperty , ^prop="Text", ^val="Invalid UserID or Password!"
T , Error , OK , Click
protected void tryProcessor(Processor aprocessor)
The method expects the testRecordData to be filled in as much as is normal when routing by record type. Thus, the getRecordType() method of testRecordData is expected to return the current record type to be executed.
aprocessor
- -- the Processor to attempt execution of the current record.Copyright © SAS Institute. All Rights Reserved.