com.notnoop.apns
Interface ReconnectPolicy

All Known Implementing Classes:
ReconnectPolicies.Always, ReconnectPolicies.EveryHalfHour, ReconnectPolicies.Never

public interface ReconnectPolicy

Represents the reconnection policy for the library. Each object should be used exclusively for one ApnsService only.


Nested Class Summary
static class ReconnectPolicy.Provided
          Types of the library provided reconnection policies.
 
Method Summary
 ReconnectPolicy copy()
          Returns a deep copy of this reconnection policy, if needed.
 void reconnected()
          Callback method to be called whenever the library makes a new connection
 boolean shouldReconnect()
          Returns true if the library should initiate a new connection for sending the message.
 

Method Detail

shouldReconnect

boolean shouldReconnect()
Returns true if the library should initiate a new connection for sending the message. The library calls this method at every message push.

Returns:
true if the library should be reconnected

reconnected

void reconnected()
Callback method to be called whenever the library makes a new connection


copy

ReconnectPolicy copy()
Returns a deep copy of this reconnection policy, if needed. Subclasses may return this instance if the object is immutable.



Copyright © 2013. All Rights Reserved.