Package com.oorian
Class AjaxPollInterval
java.lang.Object
com.oorian.AjaxPollInterval
Represents an AJAX poll interval value used in
CommunicationMode.AJAX_ONLY mode.
When using AJAX_ONLY communication mode, the client can optionally poll the server at regular intervals to retrieve pending updates. This class provides named constants for special poll interval values and can hold custom interval values.
Usage:
// Use application-wide default poll interval page.setPollInterval(AjaxPollInterval.APP_DEFAULT); // Disable polling (updates only on user-triggered events) page.setPollInterval(AjaxPollInterval.DISABLED); // Custom poll interval in milliseconds page.setPollInterval(5000);
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longUse the application-wide default poll interval set viaApplication.setDefaultPollInterval(long).static final longDisable polling. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an AjaxPollInterval with a default value ofDISABLED.AjaxPollInterval(long value) Creates an AjaxPollInterval with the specified value. -
Method Summary
-
Field Details
-
APP_DEFAULT
public static final long APP_DEFAULTUse the application-wide default poll interval set viaApplication.setDefaultPollInterval(long).- See Also:
-
DISABLED
public static final long DISABLEDDisable polling. Updates will only be retrieved in response to user-triggered events.- See Also:
-
-
Constructor Details
-
AjaxPollInterval
public AjaxPollInterval()Creates an AjaxPollInterval with a default value ofDISABLED. -
AjaxPollInterval
public AjaxPollInterval(long value) Creates an AjaxPollInterval with the specified value.- Parameters:
value- The poll interval in milliseconds (-1 = app default, 0 = disabled, >0 = interval).
-
-
Method Details
-
setValue
Sets the poll interval value.- Parameters:
value- The poll interval in milliseconds.- Returns:
- This AjaxPollInterval instance for method chaining.
-
getValue
public long getValue()Gets the poll interval value.- Returns:
- The poll interval in milliseconds (-1 = app default, 0 = disabled, >0 = interval).
-