Package com.iizix.server.prop
Class RootPropTransactionSender
java.lang.Object
com.iizix.server.prop.RootPropTransactionSender
- All Implemented Interfaces:
EventListener
,IPropMgrOwner
Class used to listen to a property container and to send events when required.
- Author:
- Christopher Mindus
Constructor Summary
ConstructorDescriptionRootPropTransactionSender
(PropMgr propMgr, PropCnr root, Worker worker, IRootPropTransactionSender sender) Constructs the instance.Method Summary
Modifier and TypeMethodDescriptionvoid
Flushes the current updates to the client.getClientContextMenuReference
(UIContextMenu contextMenu) Gets the reference to use for a context menu.void
Called when an event is triggered in the root.final void
Called when a RemoteEvent has been added and needs sending (along with all properties, etc).void
This method is called (by any thread) that has caused some kind of change in the root property of the end point.
Constructor Details
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 Details
onEvent
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
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).