mirror of
https://github.com/shred/acme4j.git
synced 2025-12-13 11:14:02 +08:00
Remove deprecated method Connection.handleRetryAfter()
This commit is contained in:
@@ -26,7 +26,6 @@ import edu.umd.cs.findbugs.annotations.Nullable;
|
||||
import org.shredzone.acme4j.Login;
|
||||
import org.shredzone.acme4j.Session;
|
||||
import org.shredzone.acme4j.exception.AcmeException;
|
||||
import org.shredzone.acme4j.exception.AcmeRetryAfterException;
|
||||
import org.shredzone.acme4j.toolbox.JSON;
|
||||
import org.shredzone.acme4j.toolbox.JSONBuilder;
|
||||
|
||||
@@ -156,22 +155,6 @@ public interface Connection extends AutoCloseable {
|
||||
*/
|
||||
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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user