mirror of https://github.com/shred/acme4j
Remove deprecated method Connection.handleRetryAfter()
parent
1dc3c7ad64
commit
ba50d4ec72
|
@ -26,7 +26,6 @@ import edu.umd.cs.findbugs.annotations.Nullable;
|
||||||
import org.shredzone.acme4j.Login;
|
import org.shredzone.acme4j.Login;
|
||||||
import org.shredzone.acme4j.Session;
|
import org.shredzone.acme4j.Session;
|
||||||
import org.shredzone.acme4j.exception.AcmeException;
|
import org.shredzone.acme4j.exception.AcmeException;
|
||||||
import org.shredzone.acme4j.exception.AcmeRetryAfterException;
|
|
||||||
import org.shredzone.acme4j.toolbox.JSON;
|
import org.shredzone.acme4j.toolbox.JSON;
|
||||||
import org.shredzone.acme4j.toolbox.JSONBuilder;
|
import org.shredzone.acme4j.toolbox.JSONBuilder;
|
||||||
|
|
||||||
|
@ -156,22 +155,6 @@ public interface Connection extends AutoCloseable {
|
||||||
*/
|
*/
|
||||||
Optional<Instant> getRetryAfter();
|
Optional<Instant> getRetryAfter();
|
||||||
|
|
||||||
/**
|
|
||||||
* Throws an {@link AcmeRetryAfterException} if the last status was HTTP Accepted and
|
|
||||||
* a Retry-After header was received.
|
|
||||||
*
|
|
||||||
* @param message
|
|
||||||
* Message to be sent along with the {@link AcmeRetryAfterException}
|
|
||||||
* @deprecated Prefer to use {@link #getRetryAfter()}.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default void handleRetryAfter(String message) throws AcmeException {
|
|
||||||
var retryAfter = getRetryAfter();
|
|
||||||
if (retryAfter.isPresent()) {
|
|
||||||
throw new AcmeRetryAfterException(message, retryAfter.get());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the nonce from the nonce header.
|
* Gets the nonce from the nonce header.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue