- All Known Implementing Classes:
AbstractAcmeProvider
,GenericAcmeProvider
public interface AcmeProvider
An
AcmeProvider
provides methods to be used for communicating with the ACME
server. Implementations handle individual features of each ACME server.
Provider implementations must be registered with Java's ServiceLoader
.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if this provider accepts the given server URI.connect
(URI serverUri, NetworkSettings networkSettings) Creates aConnection
for communication with the ACME server.createChallenge
(Login login, JSON data) Creates aChallenge
instance for the given challenge data.Returns the provider's directory.Resolves the server URI and returns the matching directory URL.
-
Method Details
-
accepts
Checks if this provider accepts the given server URI.- Parameters:
serverUri
- Server URI to test- Returns:
true
if this provider accepts the server URI,false
otherwise
-
resolve
Resolves the server URI and returns the matching directory URL.- Parameters:
serverUri
- ServerURI
- Returns:
- Resolved directory
URL
- Throws:
IllegalArgumentException
- if the serverURI
is not accepted
-
connect
Creates aConnection
for communication with the ACME server.- Parameters:
serverUri
- ServerURI
networkSettings
-NetworkSettings
to be used for the connection- Returns:
Connection
that was generated
-
directory
Returns 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.
- Parameters:
session
-Session
to be usedserverUri
- ServerURI
- Returns:
- Directory data, as JSON object, or
null
if the directory has not been changed since the last request. - Throws:
AcmeException
-
createChallenge
Creates aChallenge
instance for the given challenge data.
-