public class ServerUpdateManager
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
ServerUpdateManager(ApplicationInstance applicationInstance)
Creates a new
ServerUpdateManager. |
| Modifier and Type | Method and Description |
|---|---|
void |
enqueueCommand(Command command)
Enqueues a
Command for processing. |
PropertyUpdate |
getApplicationPropertyUpdate(java.lang.String propertyName)
Returns a
PropertyUpdate representing the
application-level property update with the specified name. |
Command[] |
getCommands()
Returns the stored
Commands. |
ServerComponentUpdate[] |
getComponentUpdates()
Returns the stored
ServerComponentUpdates. |
void |
init(ClientUpdateManager clientUpdateManager)
Initialization life-cycle method.
|
boolean |
isEmpty()
Determines if the manager has no updates.
|
boolean |
isFullRefreshRequired()
Determines if a full refresh of the client state is required.
|
void |
processApplicationPropertyUpdate(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Processes an update to a property of the
ApplicationInstance. |
void |
processComponentAdd(Component parent,
Component child)
Processes the addition of a component to the hierarchy.
|
void |
processComponentLayoutDataUpdate(Component updatedComponent)
Processes an update to the
LayoutData of a component. |
void |
processComponentPropertyUpdate(Component updatedComponent,
java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Processes an update to a property of a component (other than the
LayoutData property). |
void |
processComponentRemove(Component parent,
Component child)
Processes the removal of a component from the hierarchy.
|
void |
processComponentVisibilityUpdate(Component updatedComponent)
Processes an update to the visible state of a component.
|
void |
processFullRefresh()
Processes a full refresh of the application state, in response to a
severe change, such as application locale or style sheet.
|
public ServerUpdateManager(ApplicationInstance applicationInstance)
ServerUpdateManager.
Warning: the init() method must be
invoked before the ServerUpdateManager is used.applicationInstance - the relevant ApplicationInstanceinit(nextapp.echo.app.update.ClientUpdateManager)public void enqueueCommand(Command command)
Command for processing.command - the commandpublic PropertyUpdate getApplicationPropertyUpdate(java.lang.String propertyName)
PropertyUpdate representing the
application-level property update with the specified name.
If the specified property has not been updated, null is returned.propertyName - the name of the propertyPropertyUpdatepublic Command[] getCommands()
Commands. The commands
are NOT removed or modified by this call.public ServerComponentUpdate[] getComponentUpdates()
ServerComponentUpdates. The updates
are NOT removed or modified by this call. The updates will be returned
sorted by depth of their parent components within the hierarchy, but in
otherwise random order.public void init(ClientUpdateManager clientUpdateManager)
ServerUpdateManager.clientUpdateManager - the ClientUpdateManager that
will be used to process input from the clientpublic boolean isEmpty()
public boolean isFullRefreshRequired()
public void processApplicationPropertyUpdate(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
ApplicationInstance.propertyName - the name of the propertyoldValue - the previous value of the propertynewValue - the current value of the propertypublic void processComponentAdd(Component parent, Component child)
ServerComponentUpdate if required.parent - a component which currently exists in the hierarchychild - the component which was added to parentpublic void processComponentLayoutDataUpdate(Component updatedComponent)
LayoutData of a component.
Creates/updates a ServerComponentUpdate if required.updatedComponent - a component which currently exists in the
hierarchy whose LayoutData has changedpublic void processComponentPropertyUpdate(Component updatedComponent, java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
LayoutData property).
Creates/updates a ServerComponentUpdate if required.updatedComponent - the component whose property(s) changed.propertyName - the name of the changed propertyoldValue - The previous value of the propertynewValue - The new value of the propertypublic void processComponentRemove(Component parent, Component child)
ServerComponentUpdate if required.parent - a component which currently exists in the hierarchychild - the component which was removed from parentpublic void processComponentVisibilityUpdate(Component updatedComponent)
ServerComponentUpdate if required.updatedComponent - a component which currently exists in the
hierarchy whose visible state has changed.public void processFullRefresh()