Exemple #1
0
 public SrmRmdirResponse getResponse() {
   if (response == null) {
     try {
       response = srmRmdir();
     } catch (SRMInternalErrorException e) {
       LOGGER.error(e.toString());
       response = getFailedResponse(e.getMessage(), TStatusCode.SRM_INTERNAL_ERROR);
     } catch (SRMAuthorizationException e) {
       response = getFailedResponse(e.getMessage(), TStatusCode.SRM_AUTHORIZATION_FAILURE);
     } catch (SRMInvalidPathException e) {
       response = getFailedResponse(e.getMessage(), TStatusCode.SRM_INVALID_PATH);
     } catch (SRMNonEmptyDirectoryException e) {
       response = getFailedResponse(e.getMessage(), TStatusCode.SRM_NON_EMPTY_DIRECTORY);
     } catch (SRMException e) {
       response = getFailedResponse(e.toString());
     }
   }
   return response;
 }
 public SrmPrepareToPutResponse getResponse() {
   if (response == null) {
     try {
       response = srmPrepareToPut();
     } catch (InterruptedException e) {
       LOGGER.error(e.getMessage());
       response = getFailedResponse("Operation interrupted.", TStatusCode.SRM_INTERNAL_ERROR);
     } catch (IllegalStateTransition e) {
       LOGGER.error(e.getMessage());
       response =
           getFailedResponse("Failed to schedule operation.", TStatusCode.SRM_INTERNAL_ERROR);
     } catch (SRMInvalidRequestException e) {
       response = getFailedResponse(e.getMessage(), TStatusCode.SRM_INVALID_REQUEST);
     } catch (SRMInternalErrorException e) {
       LOGGER.error(e.getMessage());
       response = getFailedResponse(e.getMessage(), TStatusCode.SRM_INTERNAL_ERROR);
     } catch (SRMNotSupportedException e) {
       response = getFailedResponse(e.getMessage(), TStatusCode.SRM_NOT_SUPPORTED);
     }
   }
   return response;
 }