com.octo.android.robospice.retry
Interface RetryPolicy

All Known Implementing Classes:
DefaultRetryPolicy

public interface RetryPolicy

Defines the behavior of a retry policy.

Author:
SNI

Method Summary
 long getDelayBeforeRetry()
           
 int getRetryCount()
           
 void retry(SpiceException e)
          Hook method invoked when an exception occured.
 

Method Detail

getRetryCount

int getRetryCount()
Returns:
the remaining number of retry attempts. When this method returns 0, request is not retried anymore.

retry

void retry(SpiceException e)
Hook method invoked when an exception occured. Define your retry strategy here.

Parameters:
e - the exception that occured during last request invocation.

getDelayBeforeRetry

long getDelayBeforeRetry()
Returns:
the delay to sleep between each retry attempt (in ms).


Copyright © 2012-2014. All Rights Reserved.