public class SAFSVARS extends DriverConfiguredSTAFInterfaceClass implements VarsInterface
This class can also be configured to run Embedded in the same process space
as the Driver.
To do this, configure ServiceClass=org.safs.staf.service.var.EmbeddedVariableService.
When using the EmbeddedVariableService, the class can continue to use the STAF VAR
service for the storage of variable values. It can also be configured to store
variable values internally instead.
To do this, configure EmbedVars=True.
[STAF] ;NOSTAF=TRUE will launch this service as an embedded services if AUTOLAUNCH=TRUE. [SAFS_VARS] AUTOLAUNCH=TRUE ;ITEM=org.safs.tools.vars.SAFSVARS ;Service=SAFSVARS ;ServiceClass=org.safs.staf.service.var.SAFSVariableService ;ServiceClass=org.safs.staf.service.var.EmbeddedVariableService ;OPTIONS= ;EmbedVars=TRUE
The Driver's 'safs.driver.autolaunch' command-line option is also queried for this setting and overrides any other configuration source setting.
The default AUTOLAUNCH setting is TRUE.
The default ITEM value is org.safs.tools.vars.SAFSVARS
org.safs.staf.service.var.EmbeddedVariableService is one such class. This class will embed the SAFSVARS service inside the Driver process and bypass the initialization of any STAF SAFSVARS service. Combined with the EmbedVars setting, this will make all variables inaccessible to other tools and processes--effectively eliminating the use of STAF altogether.
The default SERVICECLASS value is org.safs.staf.service.SAFSVariableService
The default SERVICEJAR value is [safsroot]/lib/safsvars.jar
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
classpath
Stores classname or JAR file fullpath for STAF service initialization.
|
protected static java.lang.String |
DEFAULT_SAFSVARS_3_CLASS
"org.safs.staf.service.var.SAFSVariableService3"
|
protected static java.lang.String |
DEFAULT_SAFSVARS_CLASS
"org.safs.staf.service.var.SAFSVariableService"
|
protected static java.lang.String |
DEFAULT_SAFSVARS_EMBEDDED_CLASS
"org.safs.staf.service.var.EmbeddedVariableService"
|
protected static java.lang.String |
DEFAULT_SAFSVARS_JAR
"safsvars.jar"
|
protected SafsExpression |
se |
config, customStr, customText, debugStr, debugText, driver, DRIVER_TEMP_PROCESS, failedStr, failedText, genericStr, genericText, launchCount, log, machine, otherStr, otherText, passedStr, passedText, processName, running, SAFS_RESBUN_NAME, servicename, shutdownCount, staf, STAFPROC_EXE, warningStr, warningText, weStartedService, weStartedSTAF
Constructor and Description |
---|
SAFSVARS()
Constructor for SAFSVARS
|
Modifier and Type | Method and Description |
---|---|
void |
deleteVariable(java.lang.String var)
delete a variable from storage.
|
protected void |
finalize()
Invoke all superclass finalization.
|
java.lang.String |
getValue(java.lang.String var)
Get the value of a named variable.
|
void |
launchInterface(java.lang.Object configInfo)
Expects a DriverInterface for initialization.
|
void |
reset()
Reset or clear any cached information in the underlying tool or service.
|
java.lang.String |
resolveExpressions(java.lang.String record,
java.lang.String sep)
Process the input record for supported numeric and string expressions.
|
java.lang.String |
setValue(java.lang.String var,
java.lang.String value)
Set the value of a named variable.
|
configureJSTAFServiceEmbeddedJVMOption, extendedGenericMessage, getCoreInterface, getEmbedded64JVMBinPath, getEmbeddedJVMBinPath, getSTAFHelper, isToolRunning, logMessage, setLogUtilities, setLogUtilities, shutdown, shutdownService, simpleGenericMessage, simpleGenericSuccessMessage, simpleGenericWarningMessage, simpleSuccessMessage, simpleSuccessMessage, simpleSuccessUsingMessage, standardErrorMessage, waitForServiceStartCompletion
protected static final java.lang.String DEFAULT_SAFSVARS_CLASS
protected static final java.lang.String DEFAULT_SAFSVARS_3_CLASS
protected static final java.lang.String DEFAULT_SAFSVARS_EMBEDDED_CLASS
protected static final java.lang.String DEFAULT_SAFSVARS_JAR
protected java.lang.String classpath
protected SafsExpression se
public void launchInterface(java.lang.Object configInfo)
launchInterface
in interface ConfigurableToolsInterface
launchInterface
in class DriverConfiguredSTAFInterfaceClass
configInfo
- can be whatever the final implementation needs it to be. This
might be a String with configuration information, the name of a class, or an instance
of some object used to provide configuration assets.ConfigurableToolsInterface#launchInterface(Object)
public java.lang.String resolveExpressions(java.lang.String record, java.lang.String sep)
VarsInterface
resolveExpressions
in interface VarsInterface
VarsInterface.resolveExpressions(String, String)
public java.lang.String setValue(java.lang.String var, java.lang.String value)
SimpleVarsInterface
setValue
in interface SimpleVarsInterface
SimpleVarsInterface.setValue(String, String)
public java.lang.String getValue(java.lang.String var)
SimpleVarsInterface
getValue
in interface SimpleVarsInterface
SimpleVarsInterface.getValue(String)
public void deleteVariable(java.lang.String var)
VarsInterface
deleteVariable
in interface VarsInterface
VarsInterface.deleteVariable(String)
public void reset()
GenericToolsInterface
reset
in interface GenericToolsInterface
GenericToolsInterface#reset()
protected void finalize() throws java.lang.Throwable
finalize
in class DriverConfiguredSTAFInterfaceClass
java.lang.Throwable
DriverConfiguredSTAFInterfaceClass.finalize()
Copyright © SAS Institute. All Rights Reserved.