public class SessionCommon extends AbstractSessionImpl implements Session, DataItemSubscriptionListener
AbstractSessionImpl.DisposeListener
Session.SessionListener
Constructor and Description |
---|
SessionCommon(HiveCommon hive,
UserInformation userInformation,
Map<String,String> properties) |
Modifier and Type | Method and Description |
---|---|
void |
addFuture(NotifyFuture<?> future)
Add a future to the session.
|
void |
dataChanged(DataItem item,
Variant value,
Map<String,Variant> attributes,
boolean cache) |
void |
dispose()
Dispose the session
|
SessionCommonData |
getData() |
FolderListener |
getFolderListener() |
HiveCommon |
getHive() |
ItemChangeListener |
getListener() |
void |
removeFuture(NotifyFuture<?> future) |
void |
setListener(FolderListener folderListener) |
void |
setListener(ItemChangeListener listener) |
void |
updateStatus(String topic,
SubscriptionState subscriptionState)
The subscription status update method.
|
addDisposeListener, addSessionListener, firePrivilegeChange, getPrivileges, getProperties, getUserInformation, removeDisposeListener, removeSessionListener, setPrivileges, wrapCallbackHandler
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addSessionListener, getPrivileges, getProperties, removeSessionListener
public SessionCommon(HiveCommon hive, UserInformation userInformation, Map<String,String> properties)
public HiveCommon getHive()
public void setListener(ItemChangeListener listener)
public ItemChangeListener getListener()
public SessionCommonData getData()
public FolderListener getFolderListener()
public void setListener(FolderListener folderListener)
public void updateStatus(String topic, SubscriptionState subscriptionState)
SubscriptionListener
updateStatus
in interface SubscriptionListener<String>
topic
- The topic that is notifiedsubscriptionState
- The new status of the subscriptionpublic void dataChanged(DataItem item, Variant value, Map<String,Variant> attributes, boolean cache)
dataChanged
in interface DataItemSubscriptionListener
public void addFuture(NotifyFuture<?> future) throws InvalidSessionException
The future will be canceled when the session is completed. The session subscribes to the future state in order to remove the future from the session one it is completed.
future
- the future to addInvalidSessionException
- in case the session was already disposedpublic void removeFuture(NotifyFuture<?> future)
public void dispose()
dispose
in class AbstractSessionImpl
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.