public class ScriptDataSource extends AbstractMultiSourceDataSource
DATA_SOURCE_ID| Constructor and Description |
|---|
ScriptDataSource(org.osgi.framework.BundleContext context,
ObjectPoolTracker<DataSource> poolTracker,
ScheduledExecutorService executor,
EventProcessor eventProcessor) |
| Modifier and Type | Method and Description |
|---|---|
protected WriteAttributeResults |
convertAttributeResult(Map<String,Variant> attributes,
Object result) |
protected WriteResult |
convertValueResult(Object result) |
void |
dispose() |
protected void |
executeScript(ScriptExecutor command) |
protected Executor |
getExecutor()
Return the executor to use for sending out events
|
protected void |
handleChange(Map<String,DataSourceHandler> sources)
Handle data change
|
protected void |
handleTimer() |
protected Object |
performScript(ScriptExecutor command,
ScriptContext scriptContext) |
protected Object |
performWrite(ScriptExecutor command,
Variant value,
Map<String,Variant> attributes,
OperationParameters operationParameters) |
NotifyFuture<WriteAttributeResults> |
startWriteAttributes(Map<String,Variant> attributes,
OperationParameters operationParameters) |
NotifyFuture<WriteResult> |
startWriteValue(Variant value,
OperationParameters operationParameters) |
void |
update(Map<String,String> parameters) |
addDataSource, clearSources, getSourcesCopy, getType, setDataSourcesaddListener, removeListener, updateDatapublic ScriptDataSource(org.osgi.framework.BundleContext context,
ObjectPoolTracker<DataSource> poolTracker,
ScheduledExecutorService executor,
EventProcessor eventProcessor)
protected Executor getExecutor()
AbstractDataSourcegetExecutor in class AbstractDataSourcenullprotected Object performWrite(ScriptExecutor command, Variant value, Map<String,Variant> attributes, OperationParameters operationParameters) throws Exception
Exceptionpublic NotifyFuture<WriteAttributeResults> startWriteAttributes(Map<String,Variant> attributes, OperationParameters operationParameters)
protected WriteAttributeResults convertAttributeResult(Map<String,Variant> attributes, Object result)
protected WriteResult convertValueResult(Object result)
public NotifyFuture<WriteResult> startWriteValue(Variant value, OperationParameters operationParameters)
public void dispose()
dispose in class AbstractMultiSourceDataSourceprotected void handleTimer()
protected void handleChange(Map<String,DataSourceHandler> sources)
handleChange in class AbstractMultiSourceDataSourceprotected Object performScript(ScriptExecutor command, ScriptContext scriptContext) throws Exception
Exceptionprotected void executeScript(ScriptExecutor command)
Copyright © 2016 Eclipse SCADA Project. All rights reserved.