com.relayrides.pushy.apns
Interface FailedConnectionListener<T extends ApnsPushNotification>


public interface FailedConnectionListener<T extends ApnsPushNotification>

Listens for failed attempts to connect to an APNs gateway. Generally, a push manager will continue to try to connect until it is shut down (under the assumption that failures are temporary).

While some connection failures are temporary and likely to be resolved by retrying the connection, some causes of failure are more permanent; generally, an SSLHandshakeException indicates a problem with SSL certificates that is unlikely to be resolved by retrying the connection, and applications using Pushy are encouraged to register a listener that shuts down a push manager in the event of a handshake exception.

Author:
Jon Chambers
See Also:
PushManager.registerFailedConnectionListener(FailedConnectionListener), PushManager.unregisterFailedConnectionListener(FailedConnectionListener)

Method Summary
 void handleFailedConnection(PushManager<? extends T> pushManager, Throwable cause)
          Handles a failed attempt to connect to the APNs gateway.
 

Method Detail

handleFailedConnection

void handleFailedConnection(PushManager<? extends T> pushManager,
                            Throwable cause)
Handles a failed attempt to connect to the APNs gateway.

Parameters:
pushManager - the push manager that failed to open a connection
cause - the cause for the connection failure


Copyright © 2013–2014 RelayRides. All rights reserved.