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. Applications using Pushy are encouraged to register a
listener that watches for handshake exceptions that shuts down a push manager in the event of a pattern of failure
(transient connection problems can cause spurious exceptions, so it's best not to shut down after a single
exception).
Modifier and Type | Method and Description |
---|---|
void |
handleFailedConnection(PushManager<? extends T> pushManager,
Throwable cause)
Handles a failed attempt to connect to the APNs gateway.
|
void handleFailedConnection(PushManager<? extends T> pushManager, Throwable cause)
pushManager
- the push manager that failed to open a connectioncause
- the cause for the connection failureCopyright © 2013–2015 RelayRides. All rights reserved.