Package 

Interface RetryPolicy


  • 
    public interface RetryPolicy
    
                        

    When creating a channel, adding a reaction or sending any temporary error will trigger the retry policy The retry policy interface exposes 2 methods

    • shouldRetry: returns a boolean if the request should be retried

    • retryTimeout: How many milliseconds to wait till the next attempt

    • Method Summary

      Modifier and Type Method Description
      abstract Boolean shouldRetry(ChatClient client, Integer attempt, ChatError error) Should Retry evaluates if we should retry the failure
      abstract Integer retryTimeout(ChatClient client, Integer attempt, ChatError error) In the case that we want to retry a failed request the retryTimeout method is called to determine the timeout
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • shouldRetry

         abstract Boolean shouldRetry(ChatClient client, Integer attempt, ChatError error)

        Should Retry evaluates if we should retry the failure

      • retryTimeout

         abstract Integer retryTimeout(ChatClient client, Integer attempt, ChatError error)

        In the case that we want to retry a failed request the retryTimeout method is called to determine the timeout