Package org.apache.http.client.methods

Examples of org.apache.http.client.methods.HttpDelete.abort()


                logger.debug ("Container is not empty, can not delete a none empty container !");
                throw new FilesContainerNotEmptyException("You can't delete an non-empty container", response.getResponseHeaders(), response.getStatusLine());
              }
          }
          finally {
            method.abort();
          }
        }
        else
        {
               throw new FilesInvalidNameException(name);
View Full Code Here


      }
   
      FilesResponse response = new FilesResponse(client.execute(method));
     
      if (response.getStatusCode() == HttpStatus.SC_UNAUTHORIZED) {
        method.abort();
        if(login()) {
          method = new HttpDelete(deleteUri);
          method.getParams().setIntParameter("http.socket.timeout", connectionTimeOut);
          method.setHeader(FilesConstants.X_AUTH_TOKEN, authToken);
          if (emailAddresses != null) {
View Full Code Here

      else {
        throw new FilesException("Unexpected server response",response.getResponseHeaders(), response.getStatusLine());
      }
    }
    finally {
      if (method != null) method.abort();
    }

    }

    /**
 
View Full Code Here

      }
   
      FilesResponse response = new FilesResponse(client.execute(method));
     
      if (response.getStatusCode() == HttpStatus.SC_UNAUTHORIZED) {
        method.abort();
        if(login()) {
          method = new HttpDelete(deleteUri);
          method.getParams().setIntParameter("http.socket.timeout", connectionTimeOut);
          method.setHeader(FilesConstants.X_AUTH_TOKEN, authToken);
          if (emailAddresses != null) {
View Full Code Here

        System.out.println(response.getStatusLine());
        throw new FilesException("Unexpected server response",response.getResponseHeaders(), response.getStatusLine());
      }
    }
    finally {
      if (method != null) method.abort();
    }

    }

    /**
 
View Full Code Here

            method.getParams().setIntParameter("http.socket.timeout", connectionTimeOut);
            method.setHeader(FilesConstants.X_AUTH_TOKEN, authToken);
            FilesResponse response = new FilesResponse(client.execute(method));
           
                 if (response.getStatusCode() == HttpStatus.SC_UNAUTHORIZED) {
                   method.abort();
                login();
                   method = new HttpDelete(storageURL+"/"+sanitizeForURI(container)+"/"+sanitizeForURI(objName));
                  method.getParams().setIntParameter("http.socket.timeout", connectionTimeOut);
                method.getParams().setIntParameter("http.socket.timeout", connectionTimeOut);
                method.setHeader(FilesConstants.X_AUTH_TOKEN, authToken);
View Full Code Here

            else {
              throw new FilesException("Unexpected status from server", response.getResponseHeaders(), response.getStatusLine());
            }
          }
          finally {
            if (method != null) method.abort();
          }
        }
        else
        {
          if (!isValidObjectName(objName)) {
View Full Code Here

         HttpResponse response = httpClient.execute(httpHost, del);
         EntityUtils.consume(response.getEntity());
      } catch (Exception e) {
         throw new PersistenceException(e);
      } finally {
         del.abort();
      }
   }

   @Override
   public boolean delete(Object key) {
View Full Code Here

         EntityUtils.consume(response.getEntity());
         return isSuccessful(response.getStatusLine().getStatusCode());
      } catch (Exception e) {
         throw new PersistenceException(e);
      } finally {
         del.abort();
      }
   }

   @Override
   public MarshalledEntry load(Object key) {
View Full Code Here

         HttpResponse response = httpClient.execute(httpHost, del);
         EntityUtils.consume(response.getEntity());
      } catch (Exception e) {
         throw new PersistenceException(e);
      } finally {
         del.abort();
      }
   }

   @Override
   public boolean delete(Object key) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.