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 void
flushUpdates()
Flushes the current updates to the client.java.lang.String
getClientContextMenuReference(UIContextMenu contextMenu)
Gets the reference to use for a context menu.void
onEvent(GEvent event)
Called when an event is triggered in the root.void
onRemoteEventQueued()
Called when a RemoteEvent has been added and needs sending (along with all properties, etc).void
postPropertiesUpdateEvent()
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:
onEvent
in 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:
onRemoteEventQueued
in 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:
getClientContextMenuReference
in interfaceIPropMgrOwner
- Parameters:
contextMenu
- The context menu.- Returns:
- The reference to use, empty string for none (never null).