|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.lightstreamer.javameclient.midp.ConnectionPolicy
public class ConnectionPolicy
Bean object that contains the configuration settings about connection constraints and fault recovery.
| Constructor Summary | |
|---|---|
ConnectionPolicy()
Empty constructor |
|
| Method Summary | |
|---|---|
void |
setBufferedStreamingHandled(boolean bufferedStreamingHandled)
Setter method that turns on or off the recovery mechanism for streaming connections that appear to be buffered. |
void |
setIdleTimeout(int idleTimeout)
Setter method that sets the maximum time the Server is allowed to wait for any data to be sent in response to a polling request, if none has accumulated at request time. |
void |
setKeepAliveInterval(int keepAliveInterval)
Setter method that sets the interval between two keepalive packets to be sent by Lightstreamer Server on a stream connection when no actual data is being transmitted. |
void |
setPollingInterval(int pollingInterval)
Setter method that sets the polling interval used for poll connections. |
void |
setRetryTimeout(int retryTimeout)
Setter method that sets the time the library has to wait, after an unsuccessful streaming or polling connection attempt, before automatically performing a new attempt. |
void |
setTimeoutForReconnect(int timeoutForReconnect)
Setter method that sets the time the client Engine, after entering "STALLED" status, is allowed to wait for a keepalive packet or any data on a stream connection, before disconnecting and trying to reconnect to the Server. |
void |
setTimeoutForStalled(int timeoutForStalled)
Setter method that sets the extra time the client Engine is allowed to wait when an expected keepalive packet has not been received on a stream connection (and no actual data has arrived), before entering the "STALLED" status. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConnectionPolicy()
| Method Detail |
|---|
public void setIdleTimeout(int idleTimeout)
idleTimeout - The time (in milliseconds) the Server is allowed to wait for data to send upon polling requests (default is 30000).setPollingInterval(int)public void setKeepAliveInterval(int keepAliveInterval)
keepAliveInterval - The time, expressed in milliseconds, between two keepalive packets.
If no value is supplied, the Server will send keepalive packets based on its own configurationsetTimeoutForStalled(int),
setTimeoutForReconnect(int)public void setPollingInterval(int pollingInterval)
pollingInterval - The time (in milliseconds) between subsequent polling requests.
Zero is a legal value too, meaning that the client Engine will issue a new polling request as soon as a previous one has returned (default is 500).setIdleTimeout(int),
LSClient.openPollingConnection(ConnectionInfo, ConnectionListener),
LSClient.openPollingConnection(ConnectionInfo, ConnectionListener, ConnectionPolicy)public void setTimeoutForReconnect(int timeoutForReconnect)
timeoutForReconnect - The idle time (in milliseconds) allowed in "STALLED" status before trying to reconnect to the Server (default is 15000).setKeepAliveInterval(int),
LSClient.getStatus(),
ConnectionListener.onStatusChange(String)public void setTimeoutForStalled(int timeoutForStalled)
timeoutForStalled - The idle time (in milliseconds) allowed before entering the "STALLED" status (default is 2000).setKeepAliveInterval(int),
LSClient.getStatus(),
ConnectionListener.onStatusChange(String)public void setRetryTimeout(int retryTimeout)
retryTimeout - The time (in milliseconds) to wait (default is 5000).public void setBufferedStreamingHandled(boolean bufferedStreamingHandled)
bufferedStreamingHandled - true or false, to enable or disable
the recovery mechanism for streaming connections that appear to be buffered.
(Default value is false)LSClient.useSingleConnection(boolean)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||