Package org.sdase.commons.server.s3
Class S3Bundle.Builder<T extends io.dropwizard.core.Configuration>
java.lang.Object
org.sdase.commons.server.s3.S3Bundle.Builder<T>
- All Implemented Interfaces:
S3Bundle.FinalBuilder<T>
,S3Bundle.InitialBuilder
,S3Bundle.S3HealthCheckBuilder<T>
public static class S3Bundle.Builder<T extends io.dropwizard.core.Configuration>
extends Object
implements S3Bundle.InitialBuilder, S3Bundle.FinalBuilder<T>, S3Bundle.S3HealthCheckBuilder<T>
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the S3 bundle<C extends io.dropwizard.core.Configuration>
S3Bundle.S3HealthCheckBuilder<C>withConfigurationProvider
(S3ConfigurationProvider<C> configurationProvider) withExternalHealthCheck
(Iterable<S3Bundle.BucketNameProvider<T>> bucketNameProviders) Adds an external health check for an S3 connection against one or more buckets.withExternalHealthCheck
(String bucketName) Adds an external health check for an S3 connection against a single bucket.withHealthCheck
(Iterable<S3Bundle.BucketNameProvider<T>> bucketNameProviders) Adds an internal health check for an S3 connection against one or more buckets.withHealthCheck
(String bucketName) Adds an internal health check for an S3 connection against a single bucket.withOpenTelemetry
(io.opentelemetry.api.OpenTelemetry openTelemetry) Specifies a custom telemetry instance to use.
-
Method Details
-
withConfigurationProvider
public <C extends io.dropwizard.core.Configuration> S3Bundle.S3HealthCheckBuilder<C> withConfigurationProvider(S3ConfigurationProvider<C> configurationProvider) - Specified by:
withConfigurationProvider
in interfaceS3Bundle.InitialBuilder
- Type Parameters:
C
- the type of the applications configuration class- Parameters:
configurationProvider
- the method reference that provides the @S3Configuration
from the applications configurations class- Returns:
- the same builder
-
withOpenTelemetry
Description copied from interface:S3Bundle.FinalBuilder
Specifies a custom telemetry instance to use. If no instance is specified, theGlobalOpenTelemetry
is used.- Specified by:
withOpenTelemetry
in interfaceS3Bundle.FinalBuilder<T extends io.dropwizard.core.Configuration>
- Parameters:
openTelemetry
- The telemetry instance to use- Returns:
- the same builder
-
build
Description copied from interface:S3Bundle.FinalBuilder
Builds the S3 bundle- Specified by:
build
in interfaceS3Bundle.FinalBuilder<T extends io.dropwizard.core.Configuration>
- Returns:
- S3 bundle
-
withHealthCheck
public S3Bundle.FinalBuilder<T> withHealthCheck(Iterable<S3Bundle.BucketNameProvider<T>> bucketNameProviders) Description copied from interface:S3Bundle.S3HealthCheckBuilder
Adds an internal health check for an S3 connection against one or more buckets.- Specified by:
withHealthCheck
in interfaceS3Bundle.S3HealthCheckBuilder<T extends io.dropwizard.core.Configuration>
- Parameters:
bucketNameProviders
- bucket name providers- Returns:
- the builder instance
-
withExternalHealthCheck
public S3Bundle.FinalBuilder<T> withExternalHealthCheck(Iterable<S3Bundle.BucketNameProvider<T>> bucketNameProviders) Description copied from interface:S3Bundle.S3HealthCheckBuilder
Adds an external health check for an S3 connection against one or more buckets.- Specified by:
withExternalHealthCheck
in interfaceS3Bundle.S3HealthCheckBuilder<T extends io.dropwizard.core.Configuration>
- Parameters:
bucketNameProviders
- bucket name providers- Returns:
- the builder instance
-
withHealthCheck
Description copied from interface:S3Bundle.S3HealthCheckBuilder
Adds an internal health check for an S3 connection against a single bucket.- Specified by:
withHealthCheck
in interfaceS3Bundle.S3HealthCheckBuilder<T extends io.dropwizard.core.Configuration>
- Parameters:
bucketName
- the bucket name- Returns:
- the builder instance
-
withExternalHealthCheck
Description copied from interface:S3Bundle.S3HealthCheckBuilder
Adds an external health check for an S3 connection against a single bucket.- Specified by:
withExternalHealthCheck
in interfaceS3Bundle.S3HealthCheckBuilder<T extends io.dropwizard.core.Configuration>
- Parameters:
bucketName
- the bucket name- Returns:
- the builder instance
-