Class CSCertificateTaskContext
java.lang.Object
com.io7m.certusine.vanilla.internal.tasks.CSCertificateTaskContext
The execution context for a task.
-
Constructor Summary
ConstructorsConstructorDescriptionCSCertificateTaskContext(CSStrings inStrings, CSEventServiceType inEvents, CSTelemetryServiceType inTelemetry, CSOptions inOptions, CSCertificateStoreServiceType inCertificateStores, Clock inClock, org.shredzone.acme4j.Account inAccount, CSDomain inDomain, CSCertificate inCertificate, int inRetryAttemptsMax, CSDNSQueriesFactoryType inDnsQueries) The execution context for a task. -
Method Summary
Modifier and TypeMethodDescriptionclock()org.shredzone.acme4j.OrderCreate or get an order for this domain and certificate.voidDestroy the current order.voiddnsRecordCreated(String name, String text) A DNS record was created.domain()events()failedPermanently(Exception exception) Mark this context as permanently failed due to the given exception, and return a failed permanently status.formatProblem(org.shredzone.acme4j.Problem error) Format a problem report as text.booleanisFailed()now()options()booleanretryAttemptsExhausted(int retryAttempts) intstrings()
-
Constructor Details
-
CSCertificateTaskContext
public CSCertificateTaskContext(CSStrings inStrings, CSEventServiceType inEvents, CSTelemetryServiceType inTelemetry, CSOptions inOptions, CSCertificateStoreServiceType inCertificateStores, Clock inClock, org.shredzone.acme4j.Account inAccount, CSDomain inDomain, CSCertificate inCertificate, int inRetryAttemptsMax, CSDNSQueriesFactoryType inDnsQueries) The execution context for a task.- Parameters:
inStrings- The string resourcesinEvents- The event serviceinTelemetry- The telemetry serviceinOptions- The optionsinCertificateStores- The certificate storesinClock- The clockinAccount- The accountinDomain- The domaininCertificate- The certificateinRetryAttemptsMax- The maximum number of retry attemptsinDnsQueries- The DNS query factory
-
-
Method Details
-
telemetry
- Returns:
- The telemetry service
-
certificateStores
- Returns:
- The certificate store used during execution
-
now
- Returns:
- The current time
-
clock
- Returns:
- The clock used for time operations
-
dnsQueries
- Returns:
- A factory of DNS queries
-
options
- Returns:
- The configuration options
-
strings
- Returns:
- The string resources
-
domain
- Returns:
- The current domain
-
certificate
- Returns:
- The current certificate being processed
-
retryAttemptsMax
public int retryAttemptsMax()- Returns:
- The maximum number of times a task can be retried
-
dnsRecordCreated
-
dnsRecordsCreated
- Returns:
- The list of DNS TXT records created during execution
-
retryAttemptsExhausted
public boolean retryAttemptsExhausted(int retryAttempts) - Parameters:
retryAttempts- The number of times a task has been retried- Returns:
trueif the given number of retry attempts exceeds the allowed number
-
formatProblem
Format a problem report as text.- Parameters:
error- The report- Returns:
- The formatted report
-
events
- Returns:
- The event service
-
isFailed
public boolean isFailed()- Returns:
trueif a task associated with this context has permanently failed
-
failedPermanently
Mark this context as permanently failed due to the given exception, and return a failed permanently status.- Parameters:
exception- The exception- Returns:
- The failed status
-
createOrGetOrder
public org.shredzone.acme4j.Order createOrGetOrder() throws org.shredzone.acme4j.exception.AcmeExceptionCreate or get an order for this domain and certificate.- Returns:
- The order
- Throws:
org.shredzone.acme4j.exception.AcmeException- On errors
-
destroyOrder
public void destroyOrder()Destroy the current order.
-