public interface PushController
isUpdateNeeded()
) and if so notifying the appropriate Cockpit components by the use of CockpitEvents (see update()).
When used with a PushComponent, it provides the means necessary to update ZK view components asynchronously.
Normally there is no need to implement a push controller from scratch and extending the abstract class
AbstractPushController is usually the right way to go.| Modifier and Type | Method and Description |
|---|---|
PushComponent |
getComponent()
Returns this push controller's
PushComponent. |
Map<String,Object> |
getParameters() |
int |
getUpdateInterval()
Returns the update interval in milliseconds for this push controller.
|
boolean |
isUpdateNeeded()
Returns whether an update is required or not.
|
void |
setComponent(PushComponent component)
Sets the
PushComponent to be used by this push controller to component. |
void |
setDone()
Tells this push controller to stop processing server push events.
|
void |
setParameters(Map<String,Object> params) |
void |
setUpdateInterval(int milliseconds)
Sets the update interval in milliseconds for this push controller.
|
void |
startController()
Starts this push controller.
|
void |
update()
Called whenever an update is needed i.e.
|
void update()
isUpdateNeeded() has returned true.
Typically creates CockpitEvents and adds them to a special event queue by calling the
PushComponent.addEvent(CockpitEvent) method on the PushComponent returned by getComponent().boolean isUpdateNeeded()
true if an update is needed, false otherwiseupdate()void setDone()
getUpdateInterval()).startController()void setComponent(PushComponent component)
PushComponent to be used by this push controller to component.component - the push component used by this push controllerPushComponentPushComponent getComponent()
PushComponent.void setUpdateInterval(int milliseconds)
milliseconds - the delay between updates (or update requests) in millisecondsint getUpdateInterval()
void startController()
setDone()Copyright © 2017 SAP SE. All Rights Reserved.