setPollingInterval method
Setter method that sets the polling interval used for polling connections.
The client switches from the default streaming mode to polling mode when the client network infrastructure does not allow streaming. Also,
polling mode can be forced by calling setForcedTransport with "WS-POLLING" or "HTTP-POLLING"
as parameter.
The polling interval affects the rate at which polling requests are issued. It is the time between the start of a
polling request and the start of the next request. However, if the polling interval expires before the first polling
request has returned, then the second polling request is delayed. This may happen, for instance, when the Server delays
the answer because of the idle timeout setting. In any case, the polling interval allows for setting an upper limit on
the polling frequency.
The Server does not impose a lower limit on the client polling interval. However, in some cases, it may protect itself
against a high polling rate by delaying its answer. Network limitations and configured bandwidth limits may also lower
the polling rate, despite of the client polling interval.
The Server may, however, impose an upper limit on the polling interval, in order to be able to promptly detect
terminated polling request sequences and discard related session information.
Default 0 (pure "asynchronous polling" is configured).
Lifecycle The polling interval should be set before calling
the LightstreamerClient.connect method. However, the value can be changed at any time: the supplied value will
be used for the next polling request.
Note that, after each polling request, the value may be changed to the one imposed by the Server.
Notification A change to this setting will be notified through a call to ClientListener.onPropertyChange with argument "pollingInterval" on any ClientListener listening to the related LightstreamerClient.
newVal
The time (in milliseconds) between subsequent polling requests. Zero is a legal value too, meaning that the client will issue a new polling request as soon as a previous one has returned.
Throws IllegalArgumentException if a negative value is configured
Implementation
void setPollingInterval(int newVal) {
_pollingInterval = newVal;
}