Class BlobConfiguration
- java.lang.Object
-
- org.apache.camel.component.azure.storage.blob.BlobConfiguration
-
-
Constructor Summary
Constructors Constructor Description BlobConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BlobConfigurationcopy()StringgetAccessKey()Access key for the associated azure account name to be used for authentication with azure blob servicesStringgetAccountName()Azure account name to be used for authentication with azure blob servicesStringgetBlobName()The blob name, to consume specific blob from a container.longgetBlobOffset()Set the blob offset for the upload or download operations, default is 0LonggetBlobSequenceNumber()A user-controlled value that you can use to track requests.BlobTypegetBlobType()The blob type in order to initiate the appropriate settings for each blob typecom.azure.storage.blob.models.BlockListTypegetBlockListType()Specifies which type of blocks to return.com.azure.core.util.ContextgetChangeFeedContext()When using `getChangeFeed` producer operation, this gives additional context that is passed through the Http pipeline during the service call.OffsetDateTimegetChangeFeedEndTime()When using `getChangeFeed` producer operation, this filters the results to return events approximately before the end time.OffsetDateTimegetChangeFeedStartTime()When using `getChangeFeed` producer operation, this filters the results to return events approximately after the start time.StringgetContainerName()The blob container namecom.azure.storage.common.StorageSharedKeyCredentialgetCredentials()StorageSharedKeyCredential can be injected to create the azure client, this holds the important authentication informationCredentialTypegetCredentialType()LonggetDataCount()How many bytes to include in the range.LonggetDownloadLinkExpiration()Override the default expiration (millis) of URL download link.StringgetFileDir()The file directory where the downloaded blobs will be saved to, this can be used in both, producer and consumerIntegergetMaxResultsPerPage()Specifies the maximum number of blobs to return, including all BlobPrefix elements.intgetMaxRetryRequests()Specifies the maximum number of additional HTTP Get requests that will be made while reading the data from a response body.BlobOperationsDefinitiongetOperation()The blob operation that can be used with this component on the producerLonggetPageBlobSize()Specifies the maximum size for the page blob, up to 8 TB.StringgetPrefix()Filters the results to return only blobs whose names begin with the specified prefix.StringgetRegex()Filters the results to return only blobs whose names match the specified regular expression.com.azure.storage.blob.BlobServiceClientgetServiceClient()Client to a storage account.StringgetSourceBlobAccessKey()DurationgetTimeout()An optional timeout value beyond which aRuntimeExceptionwill be raised.booleanisCloseStreamAfterRead()Close the stream after read or keep it open, default is truebooleanisCloseStreamAfterWrite()Close the stream after write or keep it open, default is truebooleanisCommitBlockListLater()When is set to `true`, the staged blocks will not be committed directly.booleanisCreateAppendBlob()When is set to `true`, the append blocks will be created when committing append blocks.booleanisCreatePageBlob()When is set to `true`, the page blob will be created when uploading page blob.voidsetAccessKey(String accessKey)voidsetAccountName(String accountName)voidsetBlobName(String blobName)voidsetBlobOffset(long blobOffset)voidsetBlobSequenceNumber(Long blobSequenceNumber)voidsetBlobType(BlobType blobType)voidsetBlockListType(com.azure.storage.blob.models.BlockListType blockListType)voidsetChangeFeedContext(com.azure.core.util.Context changeFeedContext)voidsetChangeFeedEndTime(OffsetDateTime changeFeedEndTime)voidsetChangeFeedStartTime(OffsetDateTime changeFeedStartTime)voidsetCloseStreamAfterRead(boolean closeStreamAfterRead)voidsetCloseStreamAfterWrite(boolean closeStreamAfterWrite)voidsetCommitBlockListLater(boolean commitBlockListLater)voidsetContainerName(String containerName)voidsetCreateAppendBlob(boolean createAppendBlob)voidsetCreatePageBlob(boolean createPageBlob)voidsetCredentials(com.azure.storage.common.StorageSharedKeyCredential credentials)voidsetCredentialType(CredentialType credentialType)Determines the credential strategy to adoptvoidsetDataCount(Long dataCount)voidsetDownloadLinkExpiration(Long downloadLinkExpiration)voidsetFileDir(String fileDir)voidsetMaxResultsPerPage(Integer maxResultsPerPage)voidsetMaxRetryRequests(int maxRetryRequests)voidsetOperation(BlobOperationsDefinition operation)voidsetPageBlobSize(Long pageBlobSize)voidsetPrefix(String prefix)voidsetRegex(String regex)voidsetServiceClient(com.azure.storage.blob.BlobServiceClient serviceClient)voidsetSourceBlobAccessKey(String sourceBlobAccessKey)Source Blob Access Key: for copyblob operation, sadly, we need to have an accessKey for the source blob we want to copy Passing an accessKey as header, it's unsafe so we could set as key.voidsetTimeout(Duration timeout)
-
-
-
Method Detail
-
getAccountName
public String getAccountName()
Azure account name to be used for authentication with azure blob services
-
setAccountName
public void setAccountName(String accountName)
-
getContainerName
public String getContainerName()
The blob container name
-
setContainerName
public void setContainerName(String containerName)
-
getCredentials
public com.azure.storage.common.StorageSharedKeyCredential getCredentials()
StorageSharedKeyCredential can be injected to create the azure client, this holds the important authentication information
-
setCredentials
public void setCredentials(com.azure.storage.common.StorageSharedKeyCredential credentials)
-
getServiceClient
public com.azure.storage.blob.BlobServiceClient getServiceClient()
Client to a storage account. This client does not hold any state about a particular storage account but is instead a convenient way of sending off appropriate requests to the resource on the service. It may also be used to construct URLs to blobs and containers.This client contains operations on a service account. Operations on a container are available on
BlobContainerClientthroughBlobServiceClient.getBlobContainerClient(String), and operations on a blob are available onBlobClientthroughBlobContainerClient.getBlobClient(String).
-
setServiceClient
public void setServiceClient(com.azure.storage.blob.BlobServiceClient serviceClient)
-
getAccessKey
public String getAccessKey()
Access key for the associated azure account name to be used for authentication with azure blob services
-
setAccessKey
public void setAccessKey(String accessKey)
-
getOperation
public BlobOperationsDefinition getOperation()
The blob operation that can be used with this component on the producer
-
setOperation
public void setOperation(BlobOperationsDefinition operation)
-
getBlobName
public String getBlobName()
The blob name, to consume specific blob from a container. However, on producer it is only required for the operations on the blob level
-
setBlobName
public void setBlobName(String blobName)
-
getBlobType
public BlobType getBlobType()
The blob type in order to initiate the appropriate settings for each blob type
-
setBlobType
public void setBlobType(BlobType blobType)
-
getFileDir
public String getFileDir()
The file directory where the downloaded blobs will be saved to, this can be used in both, producer and consumer
-
setFileDir
public void setFileDir(String fileDir)
-
getBlobOffset
public long getBlobOffset()
Set the blob offset for the upload or download operations, default is 0
-
setBlobOffset
public void setBlobOffset(long blobOffset)
-
getDataCount
public Long getDataCount()
How many bytes to include in the range. Must be greater than or equal to 0 if specified.
-
setDataCount
public void setDataCount(Long dataCount)
-
getMaxRetryRequests
public int getMaxRetryRequests()
Specifies the maximum number of additional HTTP Get requests that will be made while reading the data from a response body.
-
setMaxRetryRequests
public void setMaxRetryRequests(int maxRetryRequests)
-
getTimeout
public Duration getTimeout()
An optional timeout value beyond which aRuntimeExceptionwill be raised.
-
setTimeout
public void setTimeout(Duration timeout)
-
getPrefix
public String getPrefix()
Filters the results to return only blobs whose names begin with the specified prefix. May be null to return all blobs.
-
setPrefix
public void setPrefix(String prefix)
-
getMaxResultsPerPage
public Integer getMaxResultsPerPage()
Specifies the maximum number of blobs to return, including all BlobPrefix elements. If the request does not specify maxResultsPerPage or specifies a value greater than 5,000, the server will return up to 5,000 items.
-
setMaxResultsPerPage
public void setMaxResultsPerPage(Integer maxResultsPerPage)
-
isCloseStreamAfterRead
public boolean isCloseStreamAfterRead()
Close the stream after read or keep it open, default is true
-
setCloseStreamAfterRead
public void setCloseStreamAfterRead(boolean closeStreamAfterRead)
-
isCloseStreamAfterWrite
public boolean isCloseStreamAfterWrite()
Close the stream after write or keep it open, default is true
-
setCloseStreamAfterWrite
public void setCloseStreamAfterWrite(boolean closeStreamAfterWrite)
-
getPageBlobSize
public Long getPageBlobSize()
Specifies the maximum size for the page blob, up to 8 TB. The page blob size must be aligned to a 512-byte boundary.
-
setPageBlobSize
public void setPageBlobSize(Long pageBlobSize)
-
getDownloadLinkExpiration
public Long getDownloadLinkExpiration()
Override the default expiration (millis) of URL download link.
-
setDownloadLinkExpiration
public void setDownloadLinkExpiration(Long downloadLinkExpiration)
-
isCommitBlockListLater
public boolean isCommitBlockListLater()
When is set to `true`, the staged blocks will not be committed directly.
-
setCommitBlockListLater
public void setCommitBlockListLater(boolean commitBlockListLater)
-
isCreateAppendBlob
public boolean isCreateAppendBlob()
When is set to `true`, the append blocks will be created when committing append blocks.
-
setCreateAppendBlob
public void setCreateAppendBlob(boolean createAppendBlob)
-
isCreatePageBlob
public boolean isCreatePageBlob()
When is set to `true`, the page blob will be created when uploading page blob.
-
setCreatePageBlob
public void setCreatePageBlob(boolean createPageBlob)
-
getBlobSequenceNumber
public Long getBlobSequenceNumber()
A user-controlled value that you can use to track requests. The value of the sequence number must be between 0 and 2^63 - 1.The default value is 0.
-
setBlobSequenceNumber
public void setBlobSequenceNumber(Long blobSequenceNumber)
-
getBlockListType
public com.azure.storage.blob.models.BlockListType getBlockListType()
Specifies which type of blocks to return.
-
setBlockListType
public void setBlockListType(com.azure.storage.blob.models.BlockListType blockListType)
-
getChangeFeedStartTime
public OffsetDateTime getChangeFeedStartTime()
When using `getChangeFeed` producer operation, this filters the results to return events approximately after the start time. Note: A few events belonging to the previous hour can also be returned. A few events belonging to this hour can be missing; to ensure all events from the hour are returned, round the start time down by an hour.
-
setChangeFeedStartTime
public void setChangeFeedStartTime(OffsetDateTime changeFeedStartTime)
-
getChangeFeedEndTime
public OffsetDateTime getChangeFeedEndTime()
When using `getChangeFeed` producer operation, this filters the results to return events approximately before the end time. Note: A few events belonging to the next hour can also be returned. A few events belonging to this hour can be missing; to ensure all events from the hour are returned, round the end time up by an hour.
-
setChangeFeedEndTime
public void setChangeFeedEndTime(OffsetDateTime changeFeedEndTime)
-
getChangeFeedContext
public com.azure.core.util.Context getChangeFeedContext()
When using `getChangeFeed` producer operation, this gives additional context that is passed through the Http pipeline during the service call.
-
setChangeFeedContext
public void setChangeFeedContext(com.azure.core.util.Context changeFeedContext)
-
getRegex
public String getRegex()
Filters the results to return only blobs whose names match the specified regular expression. May be null to return all if both prefix and regex are set, regex takes the priority and prefix is ignored.
-
setRegex
public void setRegex(String regex)
-
getSourceBlobAccessKey
public String getSourceBlobAccessKey()
-
getCredentialType
public CredentialType getCredentialType()
-
setCredentialType
public void setCredentialType(CredentialType credentialType)
Determines the credential strategy to adopt
-
setSourceBlobAccessKey
public void setSourceBlobAccessKey(String sourceBlobAccessKey)
Source Blob Access Key: for copyblob operation, sadly, we need to have an accessKey for the source blob we want to copy Passing an accessKey as header, it's unsafe so we could set as key.
-
copy
public BlobConfiguration copy()
-
-