public abstract class AbstractSubscriptionManager
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,DataItemValue> |
cache |
protected boolean |
started |
| Constructor and Description |
|---|
AbstractSubscriptionManager(HiveSource hiveSource,
java.util.Properties properties)
Create a new subscription manager
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
bind(Hive hive) |
protected void |
clearCache() |
java.util.Map<java.lang.String,DataItemValue> |
getCacheCopy() |
DataItemValue |
getCacheValue(java.lang.String itemId) |
protected void |
handleCreateSessionResult(java.util.concurrent.Future<Session> future) |
protected void |
handleDataChanged(java.lang.String itemId,
Variant value,
java.util.Map<java.lang.String,Variant> attributes,
boolean cache) |
protected void |
handleSubscriptionChanged(java.lang.String itemId,
SubscriptionState subscriptionState) |
protected void |
performSetHive(Hive hive) |
protected void |
putState(java.lang.String itemId,
DataItemValue value) |
void |
start() |
void |
stop() |
protected void |
subscribe(java.lang.String itemId)
Subscribe to an item
|
protected void |
subscribeAll(java.util.Set<java.lang.String> itemIds)
Subscribe to multiple items
|
protected void |
unbind() |
protected void |
unsubscribe(java.lang.String itemId) |
|
writeAttributes(java.lang.String itemId,
java.util.Map<java.lang.String,Variant> attributes,
OperationParameters operationParameters,
CallbackHandler callbackHandler) |
|
writeValue(java.lang.String itemId,
Variant value,
OperationParameters operationParameters,
CallbackHandler callbackHandler) |
protected final java.util.Map<java.lang.String,DataItemValue> cache
protected volatile boolean started
public AbstractSubscriptionManager(HiveSource hiveSource, java.util.Properties properties)
hiveSource - the source of the hive to attach toproperties - the hive connection propertiespublic void start()
public void stop()
protected void performSetHive(Hive hive)
protected void bind(Hive hive)
protected void unbind()
protected void handleCreateSessionResult(java.util.concurrent.Future<Session> future)
protected void subscribe(java.lang.String itemId)
Subscriptions may only be made after the manager was started using
start().
itemId - id of the item to subscribe toprotected void subscribeAll(java.util.Set<java.lang.String> itemIds)
Subscriptions may only be made after the manager was started using
start().
itemIds - the ids of the items to subscribe toprotected void unsubscribe(java.lang.String itemId)
protected void clearCache()
protected void putState(java.lang.String itemId,
DataItemValue value)
public java.util.Map<java.lang.String,DataItemValue> getCacheCopy()
public DataItemValue getCacheValue(java.lang.String itemId)
protected void handleDataChanged(java.lang.String itemId,
Variant value,
java.util.Map<java.lang.String,Variant> attributes,
boolean cache)
protected void handleSubscriptionChanged(java.lang.String itemId,
SubscriptionState subscriptionState)
publicwriteValue(java.lang.String itemId, Variant value, OperationParameters operationParameters, CallbackHandler callbackHandler)
publicwriteAttributes(java.lang.String itemId, java.util.Map<java.lang.String,Variant> attributes, OperationParameters operationParameters, CallbackHandler callbackHandler)
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