java.lang.Object
org.shredzone.acme4j.provider.AbstractAcmeProvider
- All Implemented Interfaces:
AcmeProvider
- Direct Known Subclasses:
GenericAcmeProvider
Abstract implementation of
AcmeProvider. It consists of a challenge
registry and a standard HttpConnector.
Implementing classes must implement at least AcmeProvider.accepts(URI)
and AcmeProvider.resolve(URI).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates aConnectionfor communication with the ACME server.createChallenge(Login login, JSON data) Creates aChallengeinstance for the given challenge data.protected HttpConnectorCreates aHttpConnector.Returns the provider's directory.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.shredzone.acme4j.provider.AcmeProvider
accepts, resolve
-
Constructor Details
-
AbstractAcmeProvider
public AbstractAcmeProvider()
-
-
Method Details
-
connect
Description copied from interface:AcmeProviderCreates aConnectionfor communication with the ACME server.- Specified by:
connectin interfaceAcmeProvider- Parameters:
serverUri- ServerURI- Returns:
Connectionthat was generated
-
directory
Description copied from interface:AcmeProviderReturns the provider's directory. The structure must contain resource URLs, and may optionally contain metadata.The default implementation resolves the server URI and fetches the directory via HTTP request. Subclasses may override this method, e.g. if the directory is static.
- Specified by:
directoryin interfaceAcmeProvider- Parameters:
session-Sessionto be usedserverUri- ServerURI- Returns:
- Directory data, as JSON object, or
nullif the directory has not been changed since the last request. - Throws:
AcmeException
-
createChallenge
Creates aChallengeinstance for the given challenge data.This implementation handles the standard challenge types. For unknown types, generic
ChallengeorTokenChallengeinstances are created.Custom provider implementations may override this method to provide challenges that are unique to the provider.
- Specified by:
createChallengein interfaceAcmeProvider- Parameters:
login-Loginto bind the challenge todata- ChallengeJSONdata- Returns:
Challengeinstance, ornullif this provider is unable to generate a matchingChallengeinstance.
-
createHttpConnector
Creates aHttpConnector.Subclasses may override this method to configure the
HttpConnector.
-