use of com.microsoft.azure.storage.blob.BlockListingFilter in project camel by apache.
the class BlobServiceProducer method getBlobBlockList.
private void getBlobBlockList(Exchange exchange) throws Exception {
CloudBlockBlob client = BlobServiceUtil.createBlockBlobClient(getConfiguration());
BlobServiceRequestOptions opts = BlobServiceUtil.getRequestOptions(exchange);
LOG.trace("Getting the blob block list [{}] from exchange [{}]...", getConfiguration().getBlobName(), exchange);
BlockListingFilter filter = exchange.getIn().getBody(BlockListingFilter.class);
if (filter == null) {
filter = BlockListingFilter.COMMITTED;
}
List<BlockEntry> blockEntries = client.downloadBlockList(filter, opts.getAccessCond(), opts.getRequestOpts(), opts.getOpContext());
ExchangeUtil.getMessageForResponse(exchange).setBody(blockEntries);
}
Aggregations