public class DataItem extends Observable
Constructor and Description |
---|
DataItem(String itemId)
create a new data item structure.
|
DataItem(String itemId,
ItemManager itemManager)
create a new data item structure.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener) |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener) |
Map<String,Variant> |
getAttributes()
Deprecated.
You should use
getSnapshotValue() instead to get a
consistent value |
String |
getItemId()
Get the item ID
|
DataItemValue |
getSnapshotValue()
Get the complete state of the current data item in an atomic operation
|
Throwable |
getSubscriptionError()
Deprecated.
You should use
getSnapshotValue() instead to get a
consistent value |
SubscriptionState |
getSubscriptionState()
Deprecated.
You should use
getSnapshotValue() instead to get a
consistent value |
protected void |
handlePerformNotifyDataChange(Variant value,
Map<String,Variant> attributes,
boolean cache) |
protected void |
handlePerformNotifySubscriptionChange(SubscriptionState subscriptionState,
Throwable subscriptionError) |
protected void |
performNotifyDataChange(Variant value,
Map<String,Variant> attributes,
boolean cache) |
protected void |
performNotifySubscriptionChange(SubscriptionState subscriptionState,
Throwable subscriptionError) |
void |
register(ItemManager itemManager) |
void |
removePropertyChangeListener(PropertyChangeListener listener) |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener) |
void |
unregister()
Unregister from the currently registered item manager
|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
public DataItem(String itemId)
Note that the item is initially unconnected
itemId
- the id of the item to register laterpublic DataItem(String itemId, ItemManager itemManager)
Note that the item is initially connected to the item manager provided.
You must call unregister()
when you want to clear the
subscription with the item on the server.
itemId
- the id of the item to registeritemManager
- the item manager to which the item will registerpublic void register(ItemManager itemManager)
public void unregister()
protected void handlePerformNotifyDataChange(Variant value, Map<String,Variant> attributes, boolean cache)
protected void performNotifyDataChange(Variant value, Map<String,Variant> attributes, boolean cache)
protected void handlePerformNotifySubscriptionChange(SubscriptionState subscriptionState, Throwable subscriptionError)
protected void performNotifySubscriptionChange(SubscriptionState subscriptionState, Throwable subscriptionError)
public DataItemValue getSnapshotValue()
@Deprecated public Map<String,Variant> getAttributes()
getSnapshotValue()
instead to get a
consistent value@Deprecated public SubscriptionState getSubscriptionState()
getSnapshotValue()
instead to get a
consistent valuepublic String getItemId()
@Deprecated public Throwable getSubscriptionError()
getSnapshotValue()
instead to get a
consistent valuenull
if there was nonepublic void addPropertyChangeListener(PropertyChangeListener listener)
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
public void removePropertyChangeListener(PropertyChangeListener listener)
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.