Package org.apache.http.client.methods

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


                logger.error(response.getStatusLine());
                throw new FilesException("Unexpected result", response.getResponseHeaders(), response.getStatusLine());
              }
          }
          finally
            method.abort();
          }
        }
        else
        {
          if (!isValidObjectName(objName)) {
View Full Code Here


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

                logger.debug(response.getStatusLine());
                throw new FilesException("Unexpected result", response.getResponseHeaders(), response.getStatusLine());
              }
          }
          finally
            method.abort();
          }
        }
        else
        {
          if (!isValidObjectName(objName)) {
View Full Code Here

                    FilesResponse response = new FilesResponse(client.execute(
                        method));

                    if (response.getStatusCode() == HttpStatus.SC_UNAUTHORIZED) {
                        method.abort();

                        login();
                        method = new HttpPut(storageURL + "/" + destinationURI);
                        method.getParams().setIntParameter("http.socket.timeout",
                                                           connectionTimeOut);
View Full Code Here

                                                 response.getStatusLine());
                    }

                } finally {
                    if (method != null) {
                        method.abort();
                    }
                }
            } else {
                if (!isValidContainerName(sourceContainer)) {
                    throw new FilesInvalidNameException(sourceContainer);
View Full Code Here

            firePutCompleted( resource, source );
        }
        finally
        {
            putMethod.abort();
        }
    }

    protected String calculateRelocatedUrl( HttpResponse response )
    {
View Full Code Here

         put.setEntity(new ByteArrayEntity(marshall(contentType, entry), ContentType.create(contentType)));
         httpClient.execute(httpHost, put);
      } catch (Exception e) {
         throw new PersistenceException(e);
      } finally {
         put.abort();
      }
   }

   @Override
   public void clear() {
View Full Code Here

         put.setEntity(new ByteArrayEntity(marshall(contentType, entry), ContentType.create(contentType)));
         httpClient.execute(httpHost, put);
      } catch (Exception e) {
         throw new PersistenceException(e);
      } finally {
         put.abort();
      }
   }

   @Override
   public void clear() {
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.