com.lightstreamer.ls_proxy
Interface PushErrorListener


public interface PushErrorListener

Receives asynchronous notifications for connection errors. The notification sequence follows the pattern: (FailedConn | ConnRetry (Reconn | ReconnAbandoned | FailedReconn) )*


Method Summary
 void onConnectionRetry(PushException e)
          Notifies that an unexpected interruption of the connection to Lightstreamer Server is being recovered by a new connection attempt.
 void onFailedConnection(PushException e)
          Notifies an unexpected interruption of the connection to Lightstreamer Server.
 void onFailedReconnection(PushException e)
          Notifies that an automatic reconnection attempt has failed.
 void onReconnection()
          Notifies that an automatic reconnection attempt has succeeded.
 void onReconnectionAbandoned()
          Notifies that an automatic reconnection attempts loop has been ended without success because of a subsequent startPushConnection or stopPushConnection call in some other thread, that has made the reconnection attempts loop obsolete.
 

Method Detail

onFailedConnection

void onFailedConnection(PushException e)
Notifies an unexpected interruption of the connection to Lightstreamer Server. In response to this event, the client is allowed to try a new call to startPushConnection inside this method. If onFailedConnectionRetry was set to true in the connection policy preferences, this notification is not received.

Parameters:
e - the specification of the error that has occurred.
See Also:
ProxyInfo

onConnectionRetry

void onConnectionRetry(PushException e)
Notifies that an unexpected interruption of the connection to Lightstreamer Server is being recovered by a new connection attempt. The automatic recovery attempt can only take place if onFailedConnectionRetry was set to true in the connection policy preferences.

Parameters:
e - the specification of the error that has occurred.
See Also:
ProxyInfo

onReconnection

void onReconnection()
Notifies that an automatic reconnection attempt has succeeded. This notification is always preceded by the onConnectionRetry notification.


onFailedReconnection

void onFailedReconnection(PushException e)
Notifies that an automatic reconnection attempt has failed. In response to this event, the client is allowed to try a further call to startPushConnection inside this method. This notification can be sent only if connectionRetryTimeoutMillis was set to zero or negative in the connection policy preferences, so that just one reconnection attempt was tried. This notification is always preceded by the onConnectionRetry notification.

Parameters:
e - the specification of the error that has occurred in the recovery connection attempt.
See Also:
ProxyInfo

onReconnectionAbandoned

void onReconnectionAbandoned()
Notifies that an automatic reconnection attempts loop has been ended without success because of a subsequent startPushConnection or stopPushConnection call in some other thread, that has made the reconnection attempts loop obsolete. This notification can be sent only if connectionRetryTimeoutMillis was set to a positive value in the connection policy preferences. This notification is always preceded by the onConnectionRetry notification.

See Also:
ProxyInfo