Package org.takes.tk

Class TkRetry

  • All Implemented Interfaces:
    Take

    public final class TkRetry
    extends Object
    implements Take
    Decorator TkRetry, which will not fail immediately on Exception, but will retry a few times.
    Since:
    0.28.3
    • Constructor Detail

      • TkRetry

        public TkRetry​(int retries,
                       int wait,
                       Take original)
        Constructor.
        Parameters:
        retries - Number of retry attempts
        wait - Time between retries
        original - Original take
    • Method Detail

      • act

        public Response act​(Request req)
                     throws IOException
        Description copied from interface: Take
        Convert request to response.
        Specified by:
        act in interface Take
        Parameters:
        req - Request to process
        Returns:
        Response
        Throws:
        IOException