CoreFiles by mySites.guru
RetryStrategyInterface.php36 lines, 1,136 bytes, from Joomla_5.1.0-beta1-Beta-Full_Package.zip
Raw History Compare with 5.0.0-beta3
md5
395d2ba28d6528d1edfe12f44b316f5d
sha1
20c17d421c0ba9f706c4547176de67addb4470f9
sha256
b74f7ce3e091887904289650ab25568ac53d796a714c5f4360c4ed83eed645cd
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\HttpClient\Retry;

use Symfony\Component\HttpClient\Response\AsyncContext;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;

/**
 * @author Jérémy Derussé <[email protected]>
 * @author Nicolas Grekas <[email protected]>
 */
interface RetryStrategyInterface
{
    /**
     * Returns whether the request should be retried.
     *
     * @param ?string $responseContent Null is passed when the body did not arrive yet
     *
     * @return bool|null Returns null to signal that the body is required to take a decision
     */
    public function shouldRetry(AsyncContext $context, ?string $responseContent, ?TransportExceptionInterface $exception): ?bool;

    /**
     * Returns the time to wait in milliseconds.
     */
    public function getDelay(AsyncContext $context, ?string $responseContent, ?TransportExceptionInterface $exception): int;
}

The same content is in 136 releases, Joomla 5.1.0-beta1 to 6.3.0-alpha1. See them all, or every version of this file.