public class TimerChannelBehavior extends org.apache.wicket.ajax.AbstractAjaxTimerBehavior implements Serializable
The polling interval is configured in the constructor. The more frequent is the polling, the more quickly your client will be updated, but also the more you will load your server and your network.
A timeout can also be configured to indicate when the behavior should consider the page has been disconnected. This is important to clean appropriately the resources associated with the page.
| Modifier and Type | Class and Description |
|---|---|
static class |
TimerChannelBehavior.TimerPushTarget
An
IPushTarget implementation which enqueue DelayedMethodCallList, also
called triggers, for a TimerChannelBehavior identified by its id. |
| Constructor and Description |
|---|
TimerChannelBehavior(org.apache.wicket.util.time.Duration updateInterval)
Construct a TimerChannelBehavior which actually refreshes the clients by polling the server
for changes at the given duration.
|
TimerChannelBehavior(org.apache.wicket.util.time.Duration updateInterval,
org.apache.wicket.util.time.Duration timeout)
Construct a TimerChannelBehavior which actually refreshes the clients by polling the server
for changes at the given duration.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getId() |
static boolean |
isConnected(org.apache.wicket.Application application,
String id,
org.apache.wicket.util.time.Duration timeout) |
org.wicketstuff.chat.channel.api.IPushTarget |
newPushTarget()
Creates a new push target to which triggers can be sent
|
protected void |
onBind() |
protected void |
onTimer(org.apache.wicket.ajax.AjaxRequestTarget target) |
void |
renderHead(org.apache.wicket.Component component,
org.apache.wicket.markup.head.IHeaderResponse response) |
String |
toString() |
getJsTimeoutCall, getUpdateInterval, isStopped, onRemove, onRestart, onUnbind, respond, restart, setUpdateInterval, shouldTrigger, stopfindIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, getChannel, getFailureScript, getPreconditionScript, getSuccessScript, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes, updateAjaxAttributesafterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, unbindpublic TimerChannelBehavior(org.apache.wicket.util.time.Duration updateInterval)
updateInterval - the interval at which the server should be polled for changespublic TimerChannelBehavior(org.apache.wicket.util.time.Duration updateInterval,
org.apache.wicket.util.time.Duration timeout)
updateInterval - the interval at which the server should be polled for changestimeout - The timeout to setpublic static boolean isConnected(org.apache.wicket.Application application,
String id,
org.apache.wicket.util.time.Duration timeout)
public String getId()
public org.wicketstuff.chat.channel.api.IPushTarget newPushTarget()
protected void onBind()
onBind in class org.apache.wicket.ajax.AbstractDefaultAjaxBehaviorprotected void onTimer(org.apache.wicket.ajax.AjaxRequestTarget target)
onTimer in class org.apache.wicket.ajax.AbstractAjaxTimerBehaviorAbstractAjaxTimerBehavior.onTimer(AjaxRequestTarget)public void renderHead(org.apache.wicket.Component component,
org.apache.wicket.markup.head.IHeaderResponse response)
renderHead in interface org.apache.wicket.markup.html.IComponentAwareHeaderContributorrenderHead in class org.apache.wicket.ajax.AbstractAjaxTimerBehaviorCopyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.