Package io.micronaut.objectstorage.azure
Class AzureBlobStorageFactory
java.lang.Object
io.micronaut.objectstorage.azure.AzureBlobStorageFactory
Creates beans of the following types:
- For each
AzureBlobStorageConfiguration
, creates aBlobServiceClientBuilder
. - For each
BlobServiceClientBuilder
, creates aBlobServiceClient
- For each
BlobServiceClient
, creates aBlobContainerClient
- Since:
- 1.0
- Author:
- Pavol Gressa
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.azure.storage.blob.BlobContainerClient
blobContainerClient
(String name, @NonNull com.azure.storage.blob.BlobServiceClient serviceClient) com.azure.storage.blob.BlobServiceClient
blobServiceClient
(@NonNull com.azure.storage.blob.BlobServiceClientBuilder builder) com.azure.storage.blob.BlobServiceClientBuilder
blobServiceClientBuilderWithSharedKeyCredential
(AzureBlobStorageConfiguration configuration, @NonNull com.azure.storage.common.StorageSharedKeyCredential sharedKeyCredential) com.azure.storage.blob.BlobServiceClientBuilder
blobServiceClientBuilderWithTokenCredential
(AzureBlobStorageConfiguration configuration, @NonNull com.azure.core.credential.TokenCredential tokenCredential)
-
Constructor Details
-
AzureBlobStorageFactory
public AzureBlobStorageFactory(io.micronaut.context.BeanContext beanContext)
-
-
Method Details
-
blobServiceClientBuilderWithTokenCredential
@EachBean(AzureBlobStorageConfiguration.class) @Requires(bean=com.azure.core.credential.TokenCredential.class) @Requires(missingBeans=com.azure.storage.common.StorageSharedKeyCredential.class) public com.azure.storage.blob.BlobServiceClientBuilder blobServiceClientBuilderWithTokenCredential(AzureBlobStorageConfiguration configuration, @NonNull @NonNull com.azure.core.credential.TokenCredential tokenCredential) - Parameters:
configuration
- the configurationtokenCredential
- the token credential- Returns:
- the
BlobServiceClientBuilder
-
blobServiceClient
@EachBean(com.azure.storage.blob.BlobServiceClientBuilder.class) public com.azure.storage.blob.BlobServiceClient blobServiceClient(@NonNull @NonNull com.azure.storage.blob.BlobServiceClientBuilder builder) - Parameters:
builder
- the builder- Returns:
- the
BlobServiceClient
-
blobContainerClient
@EachBean(com.azure.storage.blob.BlobServiceClient.class) public com.azure.storage.blob.BlobContainerClient blobContainerClient(@Parameter String name, @NonNull @NonNull com.azure.storage.blob.BlobServiceClient serviceClient) - Parameters:
name
- The configurationserviceClient
- The service client- Returns:
- The
BlobContainerClient
-