public class ScriptDataSource extends AbstractMultiSourceDataSource
DATA_SOURCE_ID| Constructor and Description |
|---|
ScriptDataSource(BundleContext context,
|
| Modifier and Type | Method and Description |
|---|---|
protected WriteAttributeResults |
convertAttributeResult(java.util.Map<java.lang.String,Variant> attributes,
java.lang.Object result) |
protected WriteResult |
convertValueResult(java.lang.Object result) |
protected void |
executeScript(ScriptExecutor command) |
protected java.util.concurrent.Executor |
getExecutor()
Return the executor to use for sending out events
|
protected void |
handleChange(java.util.Map<java.lang.String,DataSourceHandler> sources)
Handle data change
|
protected void |
handleTimer() |
protected java.lang.Object |
performScript(ScriptExecutor command,
javax.script.ScriptContext scriptContext) |
protected java.lang.Object |
performWrite(ScriptExecutor command,
Variant value,
java.util.Map<java.lang.String,Variant> attributes,
OperationParameters operationParameters) |
|
startWriteAttributes(java.util.Map<java.lang.String,Variant> attributes,
OperationParameters operationParameters) |
|
startWriteValue(Variant value,
OperationParameters operationParameters) |
void |
update(java.util.Map<java.lang.String,java.lang.String> parameters) |
addDataSource, clearSources, dispose, getSourcesCopy, getType, setDataSourcesaddListener, removeListener, updateDatapublic ScriptDataSource(BundleContext context,
poolTracker,
java.util.concurrent.ScheduledExecutorService executor,
EventProcessor eventProcessor)
protected java.util.concurrent.Executor getExecutor()
AbstractDataSourcegetExecutor in class AbstractDataSourcenullprotected java.lang.Object performWrite(ScriptExecutor command,
Variant value,
java.util.Map<java.lang.String,Variant> attributes,
OperationParameters operationParameters)
throws java.lang.Exception
java.lang.ExceptionpublicstartWriteAttributes(java.util.Map<java.lang.String,Variant> attributes, OperationParameters operationParameters)
protected WriteAttributeResults convertAttributeResult(java.util.Map<java.lang.String,Variant> attributes, java.lang.Object result)
protected WriteResult convertValueResult(java.lang.Object result)
publicstartWriteValue(Variant value, OperationParameters operationParameters)
public void update(java.util.Map<java.lang.String,java.lang.String> parameters)
throws java.lang.Exception
java.lang.Exceptionprotected void handleTimer()
protected void handleChange(java.util.Map<java.lang.String,DataSourceHandler> sources)
handleChange in class AbstractMultiSourceDataSourceprotected java.lang.Object performScript(ScriptExecutor command,
javax.script.ScriptContext scriptContext)
throws java.lang.Exception
java.lang.Exceptionprotected void executeScript(ScriptExecutor command)
Copyright (c) IBH SYSTEMS GmbH and others 2010, 2013.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0