org.apache.wicket.ajax.attributes
Class ThrottlingSettings

java.lang.Object
  extended by org.apache.wicket.ajax.attributes.ThrottlingSettings
All Implemented Interfaces:
Serializable, IClusterable

public class ThrottlingSettings
extends Object
implements IClusterable

Class to keep track of throttling settings.

Author:
ivaynberg
See Also:
Serialized Form

Constructor Summary
ThrottlingSettings(String id, Duration delay)
          Construct.
ThrottlingSettings(String id, Duration delay, boolean postponeTimerOnUpdate)
          Construct.
 
Method Summary
 Duration getDelay()
           
 String getId()
          This id is used by the client-side throttling code to keep track of the various event throttles.
 boolean getPostponeTimerOnUpdate()
          If it is set to true, then the timer is reset each time the throttle function gets called.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThrottlingSettings

public ThrottlingSettings(String id,
                          Duration delay)
Construct.

Parameters:
id - throttle id
delay - throttle delay

ThrottlingSettings

public ThrottlingSettings(String id,
                          Duration delay,
                          boolean postponeTimerOnUpdate)
Construct.

Parameters:
id - throttle id
delay - throttle delay
postponeTimerOnUpdate - postpone timer
Method Detail

getDelay

public Duration getDelay()
Returns:
throttle delay

getId

public String getId()
This id is used by the client-side throttling code to keep track of the various event throttles. Normally you can just use any unique ID here, such as the component's markupId ( Component.getMarkupId()). To unite several different events with one throttle, give them the same ID.

Returns:
throttle id

getPostponeTimerOnUpdate

public boolean getPostponeTimerOnUpdate()
If it is set to true, then the timer is reset each time the throttle function gets called. Use this behaviour if you want something to happen at X milliseconds after the *last* call to throttle. If the parameter is not set, or set to false, then the timer is not reset.



Copyright © 2006–2014 Apache Software Foundation. All rights reserved.