Class OracleCloudCertificateService
java.lang.Object
io.micronaut.oraclecloud.certificates.services.OracleCloudCertificateService
@Singleton
@Internal
@Requires(bean=OracleCloudCertificateProperties.class) @Requires(bean=OracleCloudCertificateFetcher.class)
public class OracleCloudCertificateService
extends Object
Service to contact an Oracle Cloud Certificate service and setup a certificate on a given basis.
-
Constructor Summary
ConstructorsConstructorDescriptionOracleCloudCertificateService
(List<OracleCloudCertificateProperties> oracleCloudCertificationsConfigurations, io.micronaut.context.event.ApplicationEventPublisher<CertificateEvent> eventPublisher, OracleCloudCertificateFetcher oracleCloudCertificateFetcher) Constructs a new Oracle Cloud Certificate service. -
Method Summary
Modifier and TypeMethodDescriptionprotected @NonNull Optional<CertificateEvent>
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves a list of CertificateEvents for the configured Oracle Cloud certificates.void
Refreshes the configured OCI certificates and publishesCertificateEvent
s.
-
Constructor Details
-
OracleCloudCertificateService
@Inject public OracleCloudCertificateService(List<OracleCloudCertificateProperties> oracleCloudCertificationsConfigurations, io.micronaut.context.event.ApplicationEventPublisher<CertificateEvent> eventPublisher, OracleCloudCertificateFetcher oracleCloudCertificateFetcher) Constructs a new Oracle Cloud Certificate service.- Parameters:
oracleCloudCertificationsConfigurations
- Oracle Cloud Certificate configurationseventPublisher
- Application Event PublisheroracleCloudCertificateFetcher
- Fetcher used to obtain certificate material from OCI.
-
-
Method Details
-
getCertificateEvent
@NonNull @Deprecated(forRemoval=true) protected @NonNull Optional<CertificateEvent> getCertificateEvent()Deprecated, for removal: This API element is subject to removal in a future version.Returns the certificate event.- Returns:
- certificate event
-
getCertificateEvents
Retrieves a list of CertificateEvents for the configured Oracle Cloud certificates. This method iterates over the available Oracle Cloud certificate configurations, retrieves the corresponding certificates, and constructs CertificateEvents. If a CertificateException occurs during the retrieval of a certificate, it is logged as a warning and the certificate is skipped.- Returns:
- a list of CertificateEvents for the configured Oracle Cloud certificates
-
refreshCertificate
@Retryable(attempts="${oci.certificates.refresh.retry.attempts:3}", delay="${oci.certificates.refresh.retry.delay:1s}") public void refreshCertificate()Refreshes the configured OCI certificates and publishesCertificateEvent
s. The retry behavior is controlled by oci.certificates.refresh.retry.* properties and defaults to 3 attempts with a 1s delay between attempts when not configured.
-