Package com.iizix.server.prop
Class RootPropTransactionSender
- java.lang.Object
- com.iizix.server.prop.RootPropTransactionSender
- All Implemented Interfaces:
EventListener,IPropMgrOwner
public class RootPropTransactionSender extends java.lang.Object implements EventListener, IPropMgrOwner
Class used to listen to a property container and to send events when required.- Author:
- Christopher Mindus
Constructor Summary
Constructors Constructor Description RootPropTransactionSender(PropMgr propMgr, PropCnr root, Worker worker, IRootPropTransactionSender sender)Constructs the instance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflushUpdates()Flushes the current updates to the client.java.lang.StringgetClientContextMenuReference(UIContextMenu contextMenu)Gets the reference to use for a context menu.voidonEvent(GEvent event)Called when an event is triggered in the root.voidonRemoteEventQueued()Called when a RemoteEvent has been added and needs sending (along with all properties, etc).voidpostPropertiesUpdateEvent()This method is called (by any thread) that has caused some kind of change in the root property of the end point.
Constructor Detail
RootPropTransactionSender
public RootPropTransactionSender(PropMgr propMgr, PropCnr root, Worker worker, IRootPropTransactionSender sender)
Constructs the instance.- Parameters:
propMgr- The property manager.root- The property root.worker- The worker.sender- The transaction sender.
Method Detail
onEvent
public void onEvent(GEvent event)
Called when an event is triggered in the root.- Specified by:
onEventin interfaceEventListener- Parameters:
event- The property event.
onRemoteEventQueued
public final void onRemoteEventQueued()
Called when a RemoteEvent has been added and needs sending (along with all properties, etc).- Specified by:
onRemoteEventQueuedin interfaceIPropMgrOwner
postPropertiesUpdateEvent
public void postPropertiesUpdateEvent()
This method is called (by any thread) that has caused some kind of change in the root property of the end point. This triggers a post-action of updating the property root to the end point by sending an UPDATE transaction.
flushUpdates
public void flushUpdates()
Flushes the current updates to the client. This method should not be called, it is intended to be called from the framework.
getClientContextMenuReference
public java.lang.String getClientContextMenuReference(UIContextMenu contextMenu)
Gets the reference to use for a context menu.- Specified by:
getClientContextMenuReferencein interfaceIPropMgrOwner- Parameters:
contextMenu- The context menu.- Returns:
- The reference to use, empty string for none (never null).