public abstract class ExecutableProcessImpl extends Object implements IProcessExec, Runnable
Abstract base for all executable process implementations.
This class provides logic to run a process synchronously by simply calling
execute() or in its own thread using start() and stop().
| Constructor and Description |
|---|
ExecutableProcessImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRun()
Check that all needed connections are ready for the process
to run in sync mode (not threaded).
|
void |
connectInput(String inputName,
String dataPath,
DataConnection connection)
Connects one of this process inputs with the given connection
|
void |
connectOutput(String outputName,
String dataPath,
DataConnection connection)
Connects one of this process outputs with the given connection
|
void |
connectParameter(String paramName,
String dataPath,
DataConnection connection)
Connects one of this process parameters with the given connection
|
void |
createNewInputBlocks()
Creates new DataBlock for each input signal
|
void |
createNewOutputBlocks()
Creates new DataBlock for each output signal
|
void |
dispose()
Override to dispose of all resources allocated
for the process (stop threads, OS resources, etc...)
Default method does nothing.
|
abstract void |
execute()
Execute is typically called several times on a process and should
contain all the logic to transform input/parameter values to
output values.
|
List<DataConnectionList> |
getInputConnections() |
IOPropertyList |
getInputList() |
String |
getName() |
List<DataConnectionList> |
getOutputConnections() |
IOPropertyList |
getOutputList() |
List<DataConnectionList> |
getParamConnections() |
IOPropertyList |
getParameterList() |
abstract void |
init()
Initialize the process and its internal variables (fixed parameters).
|
boolean |
isInputConnected(String inputName)
Checks if the specified input has one or more connections
|
boolean |
isOutputConnected(String outputName)
Checks if the specified output has one or more connections
|
boolean |
isParamConnected(String paramName)
Checks if the specified parameter has one or more connections
|
boolean |
isUsingQueueBuffers()
Checks if actual buffered queues are used to connect with this process
|
boolean |
needSync() |
void |
reset()
Resets the process (especially asnchronous ones) before it can be run again.
|
void |
run()
Process thread run method
|
void |
setAvailability(List<DataConnectionList> allConnections,
boolean availability)
Sets i/o availability flags in sync mode (not threaded)
This default method just sets all needed flags to the
specified state.
|
void |
setUsingQueueBuffers(boolean usingQueueBuffers) |
void |
start()
Start process thread
|
void |
stop()
Stop process thread gracefully
|
String |
toString()
Print process name and I/O info
|
void |
transferData(List<DataConnectionList> allConnections) |
public abstract void init()
throws SMLException
IProcessExecinit in interface IProcessExecSMLExceptionpublic abstract void execute()
throws SMLException
IProcessExecexecute in interface IProcessExecSMLExceptionpublic void dispose()
IProcessExecdispose in interface IProcessExecpublic void reset()
throws SMLException
IProcessExecreset in interface IProcessExecSMLExceptionpublic String getName()
getName in interface IProcessExecpublic boolean canRun()
IProcessExeccanRun in interface IProcessExecpublic void setAvailability(List<DataConnectionList> allConnections, boolean availability)
setAvailability in interface IProcessExecallConnections - (inputs, outputs or parameters)public void transferData(List<DataConnectionList> allConnections)
transferData in interface IProcessExecpublic void createNewOutputBlocks()
IProcessExeccreateNewOutputBlocks in interface IProcessExecpublic void createNewInputBlocks()
IProcessExeccreateNewInputBlocks in interface IProcessExecpublic void run()
IProcessExecrun in interface Runnablerun in interface IProcessExecpublic void start()
throws SMLException
IProcessExecstart in interface IProcessExecSMLExceptionpublic void stop()
IProcessExecstop in interface IProcessExecpublic String toString()
public void connectInput(String inputName, String dataPath, DataConnection connection) throws SMLException
IProcessExecconnectInput in interface IProcessExecinputName - name of input to connectdataPath - path of component to connectconnection - connection object whose destination will be set to the specified componentSMLExceptionpublic void connectOutput(String outputName, String dataPath, DataConnection connection) throws SMLException
IProcessExecconnectOutput in interface IProcessExecoutputName - name of output to connectdataPath - path of component to connectconnection - connection object whose source will be set to the specified componentSMLExceptionpublic void connectParameter(String paramName, String dataPath, DataConnection connection) throws SMLException
IProcessExecconnectParameter in interface IProcessExecparamName - name of parameter to connectdataPath - path of component to connectconnection - connection object whose destination will be set to the specified componentSMLExceptionpublic boolean isInputConnected(String inputName)
IProcessExecisInputConnected in interface IProcessExecinputName - name of inputpublic boolean isOutputConnected(String outputName)
IProcessExecisOutputConnected in interface IProcessExecoutputName - name of outputpublic boolean isParamConnected(String paramName)
IProcessExecisParamConnected in interface IProcessExecparamName - name of parameterpublic IOPropertyList getInputList()
getInputList in interface IProcessExecpublic IOPropertyList getOutputList()
getOutputList in interface IProcessExecpublic IOPropertyList getParameterList()
getParameterList in interface IProcessExecpublic List<DataConnectionList> getInputConnections()
getInputConnections in interface IProcessExecpublic List<DataConnectionList> getParamConnections()
getParamConnections in interface IProcessExecpublic List<DataConnectionList> getOutputConnections()
getOutputConnections in interface IProcessExecpublic boolean isUsingQueueBuffers()
IProcessExecisUsingQueueBuffers in interface IProcessExecpublic void setUsingQueueBuffers(boolean usingQueueBuffers)
setUsingQueueBuffers in interface IProcessExecpublic boolean needSync()
needSync in interface IProcessExecCopyright © 2016 VAST Team / Sensia Software LLC. All rights reserved.