public class DataItemSourceImpl extends AbstractDataSource implements ItemUpdateListener
DATA_SOURCE_ID
Constructor and Description |
---|
DataItemSourceImpl(org.osgi.framework.BundleContext context,
Executor executor) |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
protected Executor |
getExecutor()
Return the executor to use for sending out events
|
void |
notifyDataChange(Variant value,
Map<String,Variant> attributes,
boolean cache)
A change on the data item occurred.
|
void |
notifySubscriptionChange(SubscriptionState state,
Throwable error)
Notify a change in the subscription change
|
protected void |
setConnection(ConnectionService connectionService) |
NotifyFuture<WriteAttributeResults> |
startWriteAttributes(Map<String,Variant> attributes,
OperationParameters operationParameters) |
NotifyFuture<WriteResult> |
startWriteValue(Variant value,
OperationParameters operationParameters) |
void |
update(Map<String,String> parameters) |
addListener, removeListener, updateData
public DataItemSourceImpl(org.osgi.framework.BundleContext context, Executor executor)
protected Executor getExecutor()
AbstractDataSource
getExecutor
in class AbstractDataSource
null
public void dispose()
protected void setConnection(ConnectionService connectionService)
public void notifyDataChange(Variant value, Map<String,Variant> attributes, boolean cache)
ItemUpdateListener
notifyDataChange
in interface ItemUpdateListener
value
- The new value, or null
if the value did not
changeattributes
- The attributes that changed, may be null
if no
attribute change at all. The must be unmodifiable by the
receivercache
- Indicating that the change came from the cache, this means
that the change was not triggered by a device and that
all attribute where sent, not only the changed onespublic void notifySubscriptionChange(SubscriptionState state, Throwable error)
ItemUpdateListener
notifySubscriptionChange
in interface ItemUpdateListener
state
- the new subscription changeerror
- the new subscription error or null
if everything
is okpublic NotifyFuture<WriteResult> startWriteValue(Variant value, OperationParameters operationParameters)
startWriteValue
in interface DataSource
public NotifyFuture<WriteAttributeResults> startWriteAttributes(Map<String,Variant> attributes, OperationParameters operationParameters)
startWriteAttributes
in interface DataSource
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.