com.microsoft.windowsazure.services.blob.implementation.BlobExceptionProcessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of microsoft-windowsazure-api Show documentation
Show all versions of microsoft-windowsazure-api Show documentation
API for Microsoft Windows Azure Clients
/**
* Copyright Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.microsoft.windowsazure.services.blob.implementation;
import java.io.InputStream;
import java.util.HashMap;
import javax.inject.Inject;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.microsoft.windowsazure.services.blob.BlobContract;
import com.microsoft.windowsazure.services.blob.models.AcquireLeaseOptions;
import com.microsoft.windowsazure.services.blob.models.AcquireLeaseResult;
import com.microsoft.windowsazure.services.blob.models.BlobServiceOptions;
import com.microsoft.windowsazure.services.blob.models.BlockList;
import com.microsoft.windowsazure.services.blob.models.BreakLeaseResult;
import com.microsoft.windowsazure.services.blob.models.CommitBlobBlocksOptions;
import com.microsoft.windowsazure.services.blob.models.ContainerACL;
import com.microsoft.windowsazure.services.blob.models.CopyBlobOptions;
import com.microsoft.windowsazure.services.blob.models.CopyBlobResult;
import com.microsoft.windowsazure.services.blob.models.CreateBlobBlockOptions;
import com.microsoft.windowsazure.services.blob.models.CreateBlobOptions;
import com.microsoft.windowsazure.services.blob.models.CreateBlobPagesOptions;
import com.microsoft.windowsazure.services.blob.models.CreateBlobPagesResult;
import com.microsoft.windowsazure.services.blob.models.CreateBlobResult;
import com.microsoft.windowsazure.services.blob.models.CreateBlobSnapshotOptions;
import com.microsoft.windowsazure.services.blob.models.CreateBlobSnapshotResult;
import com.microsoft.windowsazure.services.blob.models.CreateContainerOptions;
import com.microsoft.windowsazure.services.blob.models.DeleteBlobOptions;
import com.microsoft.windowsazure.services.blob.models.DeleteContainerOptions;
import com.microsoft.windowsazure.services.blob.models.GetBlobMetadataOptions;
import com.microsoft.windowsazure.services.blob.models.GetBlobMetadataResult;
import com.microsoft.windowsazure.services.blob.models.GetBlobOptions;
import com.microsoft.windowsazure.services.blob.models.GetBlobPropertiesOptions;
import com.microsoft.windowsazure.services.blob.models.GetBlobPropertiesResult;
import com.microsoft.windowsazure.services.blob.models.GetBlobResult;
import com.microsoft.windowsazure.services.blob.models.GetContainerACLResult;
import com.microsoft.windowsazure.services.blob.models.GetContainerPropertiesResult;
import com.microsoft.windowsazure.services.blob.models.GetServicePropertiesResult;
import com.microsoft.windowsazure.services.blob.models.ListBlobBlocksOptions;
import com.microsoft.windowsazure.services.blob.models.ListBlobBlocksResult;
import com.microsoft.windowsazure.services.blob.models.ListBlobRegionsOptions;
import com.microsoft.windowsazure.services.blob.models.ListBlobRegionsResult;
import com.microsoft.windowsazure.services.blob.models.ListBlobsOptions;
import com.microsoft.windowsazure.services.blob.models.ListBlobsResult;
import com.microsoft.windowsazure.services.blob.models.ListContainersOptions;
import com.microsoft.windowsazure.services.blob.models.ListContainersResult;
import com.microsoft.windowsazure.services.blob.models.PageRange;
import com.microsoft.windowsazure.services.blob.models.ServiceProperties;
import com.microsoft.windowsazure.services.blob.models.SetBlobMetadataOptions;
import com.microsoft.windowsazure.services.blob.models.SetBlobMetadataResult;
import com.microsoft.windowsazure.services.blob.models.SetBlobPropertiesOptions;
import com.microsoft.windowsazure.services.blob.models.SetBlobPropertiesResult;
import com.microsoft.windowsazure.services.blob.models.SetContainerMetadataOptions;
import com.microsoft.windowsazure.services.core.ServiceException;
import com.microsoft.windowsazure.services.core.ServiceFilter;
import com.microsoft.windowsazure.services.core.utils.ServiceExceptionFactory;
import com.sun.jersey.api.client.ClientHandlerException;
import com.sun.jersey.api.client.UniformInterfaceException;
public class BlobExceptionProcessor implements BlobContract {
private static Log log = LogFactory.getLog(BlobExceptionProcessor.class);
private final BlobContract service;
@Inject
public BlobExceptionProcessor(BlobRestProxy service) {
this.service = service;
}
public BlobExceptionProcessor(BlobContract service) {
this.service = service;
}
@Override
public BlobContract withFilter(ServiceFilter filter) {
return new BlobExceptionProcessor(service.withFilter(filter));
}
private ServiceException processCatch(ServiceException e) {
log.warn(e.getMessage(), e.getCause());
return ServiceExceptionFactory.process("blob", e);
}
@Override
public GetServicePropertiesResult getServiceProperties() throws ServiceException {
try {
return service.getServiceProperties();
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public GetServicePropertiesResult getServiceProperties(BlobServiceOptions options) throws ServiceException {
try {
return service.getServiceProperties(options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public void setServiceProperties(ServiceProperties serviceProperties, BlobServiceOptions options)
throws ServiceException {
try {
service.setServiceProperties(serviceProperties, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public void setServiceProperties(ServiceProperties serviceProperties) throws ServiceException {
try {
service.setServiceProperties(serviceProperties);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public ListContainersResult listContainers() throws ServiceException {
try {
return service.listContainers();
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public ListContainersResult listContainers(ListContainersOptions options) throws ServiceException {
try {
return service.listContainers(options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public void createContainer(String container) throws ServiceException {
try {
service.createContainer(container);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public void createContainer(String container, CreateContainerOptions options) throws ServiceException {
try {
service.createContainer(container, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public void deleteContainer(String container) throws ServiceException {
try {
service.deleteContainer(container);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public void deleteContainer(String container, DeleteContainerOptions options) throws ServiceException {
try {
service.deleteContainer(container, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public GetContainerPropertiesResult getContainerProperties(String container) throws ServiceException {
try {
return service.getContainerProperties(container);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public GetContainerPropertiesResult getContainerProperties(String container, BlobServiceOptions options)
throws ServiceException {
try {
return service.getContainerProperties(container, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public GetContainerPropertiesResult getContainerMetadata(String container) throws ServiceException {
try {
return service.getContainerMetadata(container);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public GetContainerPropertiesResult getContainerMetadata(String container, BlobServiceOptions options)
throws ServiceException {
try {
return service.getContainerMetadata(container, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public GetContainerACLResult getContainerACL(String container) throws ServiceException {
try {
return service.getContainerACL(container);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public GetContainerACLResult getContainerACL(String container, BlobServiceOptions options) throws ServiceException {
try {
return service.getContainerACL(container, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public void setContainerACL(String container, ContainerACL acl) throws ServiceException {
try {
service.setContainerACL(container, acl);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public void setContainerACL(String container, ContainerACL acl, BlobServiceOptions options) throws ServiceException {
try {
service.setContainerACL(container, acl, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public void setContainerMetadata(String container, HashMap metadata) throws ServiceException {
try {
service.setContainerMetadata(container, metadata);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public void setContainerMetadata(String container, HashMap metadata,
SetContainerMetadataOptions options) throws ServiceException {
try {
service.setContainerMetadata(container, metadata, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public ListBlobsResult listBlobs(String container) throws ServiceException {
try {
return service.listBlobs(container);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public ListBlobsResult listBlobs(String container, ListBlobsOptions options) throws ServiceException {
try {
return service.listBlobs(container, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public CreateBlobResult createPageBlob(String container, String blob, long length) throws ServiceException {
try {
return service.createPageBlob(container, blob, length);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public CreateBlobResult createPageBlob(String container, String blob, long length, CreateBlobOptions options)
throws ServiceException {
try {
return service.createPageBlob(container, blob, length, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public CreateBlobResult createBlockBlob(String container, String blob, InputStream contentStream)
throws ServiceException {
try {
return service.createBlockBlob(container, blob, contentStream);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public CreateBlobResult createBlockBlob(String container, String blob, InputStream contentStream,
CreateBlobOptions options) throws ServiceException {
try {
return service.createBlockBlob(container, blob, contentStream, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public CreateBlobPagesResult clearBlobPages(String container, String blob, PageRange range) throws ServiceException {
try {
return service.clearBlobPages(container, blob, range);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public CreateBlobPagesResult clearBlobPages(String container, String blob, PageRange range,
CreateBlobPagesOptions options) throws ServiceException {
try {
return service.clearBlobPages(container, blob, range, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public CreateBlobPagesResult createBlobPages(String container, String blob, PageRange range, long length,
InputStream contentStream) throws ServiceException {
try {
return service.createBlobPages(container, blob, range, length, contentStream);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public CreateBlobPagesResult createBlobPages(String container, String blob, PageRange range, long length,
InputStream contentStream, CreateBlobPagesOptions options) throws ServiceException {
try {
return service.createBlobPages(container, blob, range, length, contentStream, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public void createBlobBlock(String container, String blob, String blockId, InputStream contentStream)
throws ServiceException {
try {
service.createBlobBlock(container, blob, blockId, contentStream);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public void createBlobBlock(String container, String blob, String blockId, InputStream contentStream,
CreateBlobBlockOptions options) throws ServiceException {
try {
service.createBlobBlock(container, blob, blockId, contentStream, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public void commitBlobBlocks(String container, String blob, BlockList blockList) throws ServiceException {
try {
service.commitBlobBlocks(container, blob, blockList);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public void commitBlobBlocks(String container, String blob, BlockList blockList, CommitBlobBlocksOptions options)
throws ServiceException {
try {
service.commitBlobBlocks(container, blob, blockList, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public ListBlobBlocksResult listBlobBlocks(String container, String blob) throws ServiceException {
try {
return service.listBlobBlocks(container, blob);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public ListBlobBlocksResult listBlobBlocks(String container, String blob, ListBlobBlocksOptions options)
throws ServiceException {
try {
return service.listBlobBlocks(container, blob, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public GetBlobPropertiesResult getBlobProperties(String container, String blob) throws ServiceException {
try {
return service.getBlobProperties(container, blob);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public GetBlobPropertiesResult getBlobProperties(String container, String blob, GetBlobPropertiesOptions options)
throws ServiceException {
try {
return service.getBlobProperties(container, blob, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public GetBlobMetadataResult getBlobMetadata(String container, String blob) throws ServiceException {
try {
return service.getBlobMetadata(container, blob);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public GetBlobMetadataResult getBlobMetadata(String container, String blob, GetBlobMetadataOptions options)
throws ServiceException {
try {
return service.getBlobMetadata(container, blob, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public ListBlobRegionsResult listBlobRegions(String container, String blob) throws ServiceException {
try {
return service.listBlobRegions(container, blob);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public ListBlobRegionsResult listBlobRegions(String container, String blob, ListBlobRegionsOptions options)
throws ServiceException {
try {
return service.listBlobRegions(container, blob, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public SetBlobPropertiesResult setBlobProperties(String container, String blob, SetBlobPropertiesOptions options)
throws ServiceException {
try {
return service.setBlobProperties(container, blob, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public SetBlobMetadataResult setBlobMetadata(String container, String blob, HashMap metadata)
throws ServiceException {
try {
return service.setBlobMetadata(container, blob, metadata);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public SetBlobMetadataResult setBlobMetadata(String container, String blob, HashMap metadata,
SetBlobMetadataOptions options) throws ServiceException {
try {
return service.setBlobMetadata(container, blob, metadata, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public GetBlobResult getBlob(String container, String blob) throws ServiceException {
try {
return service.getBlob(container, blob);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public GetBlobResult getBlob(String container, String blob, GetBlobOptions options) throws ServiceException {
try {
return service.getBlob(container, blob, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public void deleteBlob(String container, String blob) throws ServiceException {
try {
service.deleteBlob(container, blob);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public void deleteBlob(String container, String blob, DeleteBlobOptions options) throws ServiceException {
try {
service.deleteBlob(container, blob, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public CreateBlobSnapshotResult createBlobSnapshot(String container, String blob) throws ServiceException {
try {
return service.createBlobSnapshot(container, blob);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public CreateBlobSnapshotResult createBlobSnapshot(String container, String blob, CreateBlobSnapshotOptions options)
throws ServiceException {
try {
return service.createBlobSnapshot(container, blob, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public CopyBlobResult copyBlob(String destinationContainer, String destinationBlob, String sourceContainer,
String sourceBlob) throws ServiceException {
try {
return service.copyBlob(destinationContainer, destinationBlob, sourceContainer, sourceBlob);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public CopyBlobResult copyBlob(String destinationContainer, String destinationBlob, String sourceContainer,
String sourceBlob, CopyBlobOptions options) throws ServiceException {
try {
return service.copyBlob(destinationContainer, destinationBlob, sourceContainer, sourceBlob, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public AcquireLeaseResult acquireLease(String container, String blob) throws ServiceException {
try {
return service.acquireLease(container, blob);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public AcquireLeaseResult acquireLease(String container, String blob, AcquireLeaseOptions options)
throws ServiceException {
try {
return service.acquireLease(container, blob, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public AcquireLeaseResult renewLease(String container, String blob, String leaseId) throws ServiceException {
try {
return service.renewLease(container, blob, leaseId);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public AcquireLeaseResult renewLease(String container, String blob, String leaseId, BlobServiceOptions options)
throws ServiceException {
try {
return service.renewLease(container, blob, leaseId, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public void releaseLease(String container, String blob, String leaseId) throws ServiceException {
try {
service.releaseLease(container, blob, leaseId);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public void releaseLease(String container, String blob, String leaseId, BlobServiceOptions options)
throws ServiceException {
try {
service.releaseLease(container, blob, leaseId, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
@Deprecated
public void breakLease(String container, String blob, String leaseId) throws ServiceException {
breakLease(container, blob);
}
@Override
@Deprecated
public void breakLease(String container, String blob, String leaseId, BlobServiceOptions options) throws ServiceException {
breakLease(container, blob, options);
}
@Override
public BreakLeaseResult breakLease(String container, String blob) throws ServiceException {
try {
return service.breakLease(container, blob);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
@Override
public BreakLeaseResult breakLease(String container, String blob, BlobServiceOptions options)
throws ServiceException {
try {
return service.breakLease(container, blob, options);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy