Prefer Guava HttpHeaders over JAX-RS

jclouds code contains more instances of the former and Guava has
additional constants like CONTENT_MD5.
This commit is contained in:
Andrew Gaul 2014-05-15 01:38:15 -07:00
parent 44aea81972
commit 8d51ad6f87
38 changed files with 42 additions and 45 deletions

View File

@ -30,7 +30,6 @@ import javax.inject.Inject;
import javax.inject.Named; import javax.inject.Named;
import javax.inject.Provider; import javax.inject.Provider;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.atmos.reference.AtmosHeaders; import org.jclouds.atmos.reference.AtmosHeaders;
import org.jclouds.crypto.Crypto; import org.jclouds.crypto.Crypto;
@ -52,6 +51,7 @@ import com.google.common.collect.ImmutableMap.Builder;
import com.google.common.collect.Multimaps; import com.google.common.collect.Multimaps;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import com.google.common.io.ByteProcessor; import com.google.common.io.ByteProcessor;
import com.google.common.net.HttpHeaders;
/** /**
* Signs the EMC Atmos Online Storage request. * Signs the EMC Atmos Online Storage request.

View File

@ -21,8 +21,6 @@ import static org.testng.Assert.assertEquals;
import java.io.IOException; import java.io.IOException;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.Fallbacks.FalseOnNotFoundOr404; import org.jclouds.Fallbacks.FalseOnNotFoundOr404;
import org.jclouds.Fallbacks.NullOnNotFoundOr404; import org.jclouds.Fallbacks.NullOnNotFoundOr404;
import org.jclouds.Fallbacks.VoidOnNotFoundOr404; import org.jclouds.Fallbacks.VoidOnNotFoundOr404;
@ -55,6 +53,7 @@ import org.testng.annotations.Test;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.common.net.HttpHeaders;
import com.google.common.reflect.Invokable; import com.google.common.reflect.Invokable;
import com.google.inject.Module; import com.google.inject.Module;
/** /**

View File

@ -22,7 +22,6 @@ import java.io.IOException;
import java.security.InvalidKeyException; import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import org.jclouds.ContextBuilder; import org.jclouds.ContextBuilder;
@ -42,6 +41,7 @@ import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.ImmutableMultimap.Builder; import com.google.common.collect.ImmutableMultimap.Builder;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Multimap; import com.google.common.collect.Multimap;
import com.google.common.net.HttpHeaders;
import com.google.inject.Injector; import com.google.inject.Injector;
import com.google.inject.Module; import com.google.inject.Module;

View File

@ -17,11 +17,11 @@
package org.jclouds.openstack.nova.v2_0.functions; package org.jclouds.openstack.nova.v2_0.functions;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpResponse;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.net.HttpHeaders;
/** /**
* This parses {@link Image} from the body of the link in the Location header of the HTTPResponse. * This parses {@link Image} from the body of the link in the Location header of the HTTPResponse.

View File

@ -21,7 +21,6 @@ import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue; import static org.testng.Assert.assertTrue;
import javax.ws.rs.HttpMethod; import javax.ws.rs.HttpMethod;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
@ -35,6 +34,7 @@ import org.jclouds.openstack.nova.v2_0.parse.ParseFlavorTest;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import com.google.common.net.HttpHeaders;
/** /**
* Tests annotation parsing of {@code FlavorAsyncApi} * Tests annotation parsing of {@code FlavorAsyncApi}

View File

@ -31,7 +31,6 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpResponse;
@ -44,6 +43,7 @@ import org.testng.annotations.Test;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.google.common.net.HttpHeaders;
/** /**
* @author Everett Toews * @author Everett Toews

View File

@ -19,7 +19,7 @@ package org.jclouds.route53.filters;
import static com.google.common.base.Charsets.UTF_8; import static com.google.common.base.Charsets.UTF_8;
import static com.google.common.base.Throwables.propagate; import static com.google.common.base.Throwables.propagate;
import static com.google.common.io.BaseEncoding.base64; import static com.google.common.io.BaseEncoding.base64;
import static javax.ws.rs.core.HttpHeaders.DATE; import static com.google.common.net.HttpHeaders.DATE;
import java.security.InvalidKeyException; import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;

View File

@ -22,12 +22,13 @@ import static org.jclouds.s3.reference.S3Constants.PROPERTY_S3_VIRTUAL_HOST_BUCK
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Named; import javax.inject.Named;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
import org.jclouds.rest.Binder; import org.jclouds.rest.Binder;
import org.jclouds.rest.binders.BindAsHostPrefix; import org.jclouds.rest.binders.BindAsHostPrefix;
import com.google.common.net.HttpHeaders;
/** /**
* *
* @author Adrian Cole * @author Adrian Cole

View File

@ -21,13 +21,14 @@ import static com.google.common.base.Preconditions.checkNotNull;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.blobstore.binders.BindMapToHeadersWithPrefix; import org.jclouds.blobstore.binders.BindMapToHeadersWithPrefix;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
import org.jclouds.rest.Binder; import org.jclouds.rest.Binder;
import org.jclouds.s3.domain.S3Object; import org.jclouds.s3.domain.S3Object;
import com.google.common.net.HttpHeaders;
/** /**
* *
* @author Adrian Cole * @author Adrian Cole

View File

@ -38,7 +38,6 @@ import javax.inject.Inject;
import javax.inject.Named; import javax.inject.Named;
import javax.inject.Provider; import javax.inject.Provider;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.Constants; import org.jclouds.Constants;
import org.jclouds.aws.domain.SessionCredentials; import org.jclouds.aws.domain.SessionCredentials;
@ -64,6 +63,7 @@ import com.google.common.collect.Ordering;
import com.google.common.collect.SortedSetMultimap; import com.google.common.collect.SortedSetMultimap;
import com.google.common.collect.TreeMultimap; import com.google.common.collect.TreeMultimap;
import com.google.common.io.ByteProcessor; import com.google.common.io.ByteProcessor;
import com.google.common.net.HttpHeaders;
/** /**
* Signs the S3 request. * Signs the S3 request.

View File

@ -24,7 +24,6 @@ import java.util.regex.Pattern;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Named; import javax.inject.Named;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.domain.BlobMetadata;
import org.jclouds.blobstore.functions.ParseSystemAndUserMetadataFromHeaders; import org.jclouds.blobstore.functions.ParseSystemAndUserMetadataFromHeaders;
@ -36,6 +35,7 @@ import org.jclouds.s3.domain.MutableObjectMetadata;
import com.google.common.annotations.VisibleForTesting; import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.net.HttpHeaders;
/** /**
* This parses @{link {@link org.jclouds.s3.domain.internal.MutableObjectMetadata} from HTTP * This parses @{link {@link org.jclouds.s3.domain.internal.MutableObjectMetadata} from HTTP

View File

@ -23,7 +23,6 @@ import java.net.URI;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.aws.domain.AWSError; import org.jclouds.aws.domain.AWSError;
import org.jclouds.aws.util.AWSUtils; import org.jclouds.aws.util.AWSUtils;
@ -32,6 +31,8 @@ import org.jclouds.http.HttpResponse;
import org.jclouds.http.handlers.BackoffLimitedRetryHandler; import org.jclouds.http.handlers.BackoffLimitedRetryHandler;
import org.jclouds.http.handlers.RedirectionRetryHandler; import org.jclouds.http.handlers.RedirectionRetryHandler;
import com.google.common.net.HttpHeaders;
/** /**
* Handles Retryable responses with error codes in the 3xx range * Handles Retryable responses with error codes in the 3xx range
* *

View File

@ -23,8 +23,6 @@ import static org.testng.Assert.assertEquals;
import java.net.URI; import java.net.URI;
import java.util.Properties; import java.util.Properties;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.blobstore.binders.BindBlobToMultipartFormTest; import org.jclouds.blobstore.binders.BindBlobToMultipartFormTest;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
import org.jclouds.rest.internal.GeneratedHttpRequest; import org.jclouds.rest.internal.GeneratedHttpRequest;
@ -41,6 +39,7 @@ import org.testng.annotations.Test;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.common.collect.SortedSetMultimap; import com.google.common.collect.SortedSetMultimap;
import com.google.common.collect.TreeMultimap; import com.google.common.collect.TreeMultimap;
import com.google.common.net.HttpHeaders;
/** /**
* Tests behavior of {@code RequestAuthorizeSignature} * Tests behavior of {@code RequestAuthorizeSignature}
* *

View File

@ -25,7 +25,6 @@ import static org.testng.Assert.assertEquals;
import java.util.Date; import java.util.Date;
import java.util.Map; import java.util.Map;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import org.jclouds.date.internal.SimpleDateFormatDateService; import org.jclouds.date.internal.SimpleDateFormatDateService;
@ -39,6 +38,7 @@ import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.google.common.net.HttpHeaders;
import com.google.inject.AbstractModule; import com.google.inject.AbstractModule;
import com.google.inject.Guice; import com.google.inject.Guice;
import com.google.inject.name.Names; import com.google.inject.name.Names;

View File

@ -43,7 +43,6 @@ import javax.inject.Inject;
import javax.inject.Named; import javax.inject.Named;
import javax.inject.Provider; import javax.inject.Provider;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.Constants; import org.jclouds.Constants;
import org.jclouds.aws.domain.SessionCredentials; import org.jclouds.aws.domain.SessionCredentials;
@ -66,6 +65,7 @@ import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Multimap; import com.google.common.collect.Multimap;
import com.google.common.collect.TreeMultimap; import com.google.common.collect.TreeMultimap;
import com.google.common.io.ByteProcessor; import com.google.common.io.ByteProcessor;
import com.google.common.net.HttpHeaders;
/** /**
* *

View File

@ -20,8 +20,6 @@ import static javax.ws.rs.HttpMethod.GET;
import static org.jclouds.aws.reference.AWSConstants.PROPERTY_HEADER_TAG; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_HEADER_TAG;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.ContextBuilder; import org.jclouds.ContextBuilder;
import org.jclouds.aws.xml.SessionCredentialsHandlerTest; import org.jclouds.aws.xml.SessionCredentialsHandlerTest;
import org.jclouds.date.TimeStamp; import org.jclouds.date.TimeStamp;
@ -42,6 +40,7 @@ import com.google.inject.AbstractModule;
import com.google.inject.Injector; import com.google.inject.Injector;
import com.google.inject.Module; import com.google.inject.Module;
import com.google.inject.name.Names; import com.google.inject.name.Names;
import com.google.common.net.HttpHeaders;
/** /**
* Tests behavior of {@code FormSigner} * Tests behavior of {@code FormSigner}
* *

View File

@ -20,7 +20,6 @@ import static com.google.common.base.Preconditions.checkArgument;
import static org.jclouds.http.HttpUtils.attemptToParseSizeAndRangeFromHeaders; import static org.jclouds.http.HttpUtils.attemptToParseSizeAndRangeFromHeaders;
import javax.inject.Inject; import javax.inject.Inject;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.domain.BlobMetadata;
import org.jclouds.blobstore.functions.ParseSystemAndUserMetadataFromHeaders; import org.jclouds.blobstore.functions.ParseSystemAndUserMetadataFromHeaders;
@ -33,6 +32,7 @@ import org.jclouds.rest.InvocationContext;
import org.jclouds.rest.internal.GeneratedHttpRequest; import org.jclouds.rest.internal.GeneratedHttpRequest;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.net.HttpHeaders;
/** /**
* This parses @{link {@link MutableObjectInfoWithMetadata} from HTTP headers. * This parses @{link {@link MutableObjectInfoWithMetadata} from HTTP headers.

View File

@ -18,7 +18,6 @@ package org.jclouds.vcloud.filters;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.http.HttpException; import org.jclouds.http.HttpException;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
@ -27,6 +26,7 @@ import org.jclouds.vcloud.VCloudToken;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.ImmutableMultimap;
import com.google.common.net.HttpHeaders;
/** /**
* Adds the VCloud Token to the request as a cookie * Adds the VCloud Token to the request as a cookie

View File

@ -26,7 +26,6 @@ import java.util.regex.Pattern;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Provider; import javax.inject.Provider;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpResponse;
import org.jclouds.http.HttpResponseException; import org.jclouds.http.HttpResponseException;
@ -41,6 +40,7 @@ import org.jclouds.vcloud.xml.OrgListHandler;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.base.Predicates; import com.google.common.base.Predicates;
import com.google.common.collect.Iterables; import com.google.common.collect.Iterables;
import com.google.common.net.HttpHeaders;
/** /**
* This parses {@link VCloudSession} from HTTP headers. * This parses {@link VCloudSession} from HTTP headers.

View File

@ -18,13 +18,12 @@ package org.jclouds.vcloud.filters;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
import com.google.common.net.HttpHeaders;
/** /**
* @author Adrian Cole * @author Adrian Cole

View File

@ -22,8 +22,6 @@ import static org.testng.Assert.assertEquals;
import java.io.IOException; import java.io.IOException;
import java.net.URI; import java.net.URI;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
import org.jclouds.http.filters.BasicAuthentication; import org.jclouds.http.filters.BasicAuthentication;
import org.jclouds.location.Provider; import org.jclouds.location.Provider;
@ -37,6 +35,7 @@ import org.testng.annotations.Test;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.common.net.HttpHeaders;
import com.google.common.reflect.Invokable; import com.google.common.reflect.Invokable;
import com.google.inject.Binder; import com.google.inject.Binder;
import com.google.inject.Module; import com.google.inject.Module;

View File

@ -27,7 +27,6 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentMap;
import javax.inject.Inject; import javax.inject.Inject;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.blobstore.domain.Blob; import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.domain.Blob.Factory; import org.jclouds.blobstore.domain.Blob.Factory;
@ -48,6 +47,7 @@ import com.google.common.base.Throwables;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.common.collect.Multimaps; import com.google.common.collect.Multimaps;
import com.google.common.io.ByteStreams; import com.google.common.io.ByteStreams;
import com.google.common.net.HttpHeaders;
public class TransientStorageStrategy implements LocalStorageStrategy { public class TransientStorageStrategy implements LocalStorageStrategy {
private final ConcurrentMap<String, ConcurrentMap<String, Blob>> containerToBlobs = new ConcurrentHashMap<String, ConcurrentMap<String, Blob>>(); private final ConcurrentMap<String, ConcurrentMap<String, Blob>> containerToBlobs = new ConcurrentHashMap<String, ConcurrentMap<String, Blob>>();

View File

@ -28,7 +28,6 @@ import java.util.Map.Entry;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Named; import javax.inject.Named;
import javax.inject.Provider; import javax.inject.Provider;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.blobstore.domain.MutableBlobMetadata; import org.jclouds.blobstore.domain.MutableBlobMetadata;
import org.jclouds.date.DateService; import org.jclouds.date.DateService;
@ -41,6 +40,7 @@ import org.jclouds.rest.internal.GeneratedHttpRequest;
import com.google.common.annotations.VisibleForTesting; import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.net.HttpHeaders;
/** /**
* @author Adrian Cole * @author Adrian Cole

View File

@ -19,7 +19,6 @@ package org.jclouds.blobstore.functions;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
import javax.inject.Provider; import javax.inject.Provider;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.domain.BlobMetadata;
@ -31,6 +30,8 @@ import org.jclouds.http.HttpResponse;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import com.google.common.net.HttpHeaders;
/** /**
* @author Adrian Cole * @author Adrian Cole
*/ */

View File

@ -30,7 +30,6 @@ import javax.inject.Inject;
import javax.inject.Named; import javax.inject.Named;
import javax.inject.Provider; import javax.inject.Provider;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.Constants; import org.jclouds.Constants;
import org.jclouds.crypto.Crypto; import org.jclouds.crypto.Crypto;
@ -53,6 +52,7 @@ import com.google.common.collect.ImmutableMap.Builder;
import com.google.common.collect.Multimaps; import com.google.common.collect.Multimaps;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import com.google.common.io.ByteProcessor; import com.google.common.io.ByteProcessor;
import com.google.common.net.HttpHeaders;
/** /**
* Signs the Azure Storage request. * Signs the Azure Storage request.

View File

@ -23,7 +23,6 @@ import java.io.IOException;
import java.net.URI; import java.net.URI;
import javax.ws.rs.HttpMethod; import javax.ws.rs.HttpMethod;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.ContextBuilder; import org.jclouds.ContextBuilder;
import org.jclouds.azure.storage.config.AzureStorageRestClientModule; import org.jclouds.azure.storage.config.AzureStorageRestClientModule;
@ -38,6 +37,7 @@ import org.testng.annotations.DataProvider;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import com.google.common.net.HttpHeaders;
import com.google.inject.Injector; import com.google.inject.Injector;
import com.google.inject.Module; import com.google.inject.Module;

View File

@ -48,7 +48,7 @@ public interface ContentMetadata {
* tail, range, or startAt. * tail, range, or startAt.
* *
* @return the length in bytes that can be be obtained from {@link #getInput()} * @return the length in bytes that can be be obtained from {@link #getInput()}
* @see javax.ws.rs.core.HttpHeaders#CONTENT_LENGTH * @see com.google.common.net.HttpHeaders#CONTENT_LENGTH
* @see org.jclouds.http.options.GetOptions * @see org.jclouds.http.options.GetOptions
*/ */
@Nullable @Nullable

View File

@ -18,14 +18,13 @@ package org.jclouds.io.payloads;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.io.Payload; import org.jclouds.io.Payload;
import org.jclouds.io.Payloads; import org.jclouds.io.Payloads;
import org.jclouds.javax.annotation.Nullable; import org.jclouds.javax.annotation.Nullable;
import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.Multimap; import com.google.common.collect.Multimap;
import com.google.common.net.HttpHeaders;
/** /**
* *

View File

@ -17,10 +17,10 @@
package org.jclouds.rest.internal; package org.jclouds.rest.internal;
import static com.google.common.base.Throwables.propagate; import static com.google.common.base.Throwables.propagate;
import static com.google.common.hash.Hashing.md5; import static com.google.common.hash.Hashing.md5;
import static com.google.common.net.HttpHeaders.TRANSFER_ENCODING;
import static com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor; import static com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor;
import static com.google.inject.name.Names.named; import static com.google.inject.name.Names.named;
import static org.easymock.EasyMock.createMock; import static org.easymock.EasyMock.createMock;
import static org.eclipse.jetty.http.HttpHeaders.TRANSFER_ENCODING;
import static org.jclouds.Constants.PROPERTY_IO_WORKER_THREADS; import static org.jclouds.Constants.PROPERTY_IO_WORKER_THREADS;
import static org.jclouds.Constants.PROPERTY_USER_THREADS; import static org.jclouds.Constants.PROPERTY_USER_THREADS;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;

View File

@ -62,7 +62,6 @@ import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam; import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import org.eclipse.jetty.http.HttpHeaders;
import org.jclouds.Constants; import org.jclouds.Constants;
import org.jclouds.ContextBuilder; import org.jclouds.ContextBuilder;
import org.jclouds.date.DateService; import org.jclouds.date.DateService;
@ -142,6 +141,7 @@ import com.google.common.collect.ImmutableSortedSet;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Multimap; import com.google.common.collect.Multimap;
import com.google.common.io.Files; import com.google.common.io.Files;
import com.google.common.net.HttpHeaders;
import com.google.common.reflect.Invokable; import com.google.common.reflect.Invokable;
import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListenableFuture;

View File

@ -25,7 +25,6 @@ import java.util.Set;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.ws.rs.HttpMethod; import javax.ws.rs.HttpMethod;
import javax.ws.rs.core.HttpHeaders;
import org.apache.http.HttpEntity; import org.apache.http.HttpEntity;
import org.apache.http.HttpEntityEnclosingRequest; import org.apache.http.HttpEntityEnclosingRequest;
@ -56,6 +55,7 @@ import org.jclouds.io.payloads.StringPayload;
import com.google.common.base.Throwables; import com.google.common.base.Throwables;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import com.google.common.net.HttpHeaders;
/** /**
* *

View File

@ -27,7 +27,6 @@ import java.util.Set;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
import org.jclouds.http.HttpUtils; import org.jclouds.http.HttpUtils;
@ -43,6 +42,7 @@ import com.google.appengine.repackaged.com.google.common.base.Throwables;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import com.google.common.io.ByteStreams; import com.google.common.io.ByteStreams;
import com.google.common.net.HttpHeaders;
/** /**
* *

View File

@ -26,7 +26,6 @@ import java.security.cert.CertificateException;
import java.util.Date; import java.util.Date;
import javax.ws.rs.HttpMethod; import javax.ws.rs.HttpMethod;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.crypto.Crypto; import org.jclouds.crypto.Crypto;
import org.jclouds.date.internal.DateServiceDateCodecFactory; import org.jclouds.date.internal.DateServiceDateCodecFactory;
@ -46,6 +45,7 @@ import com.google.appengine.api.urlfetch.HTTPRequest;
import com.google.appengine.repackaged.com.google.common.base.Charsets; import com.google.appengine.repackaged.com.google.common.base.Charsets;
import com.google.common.base.Throwables; import com.google.common.base.Throwables;
import com.google.common.io.Files; import com.google.common.io.Files;
import com.google.common.net.HttpHeaders;
/** /**
* *

View File

@ -27,8 +27,6 @@ import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException; import java.security.cert.CertificateException;
import java.util.List; import java.util.List;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.crypto.Crypto; import org.jclouds.crypto.Crypto;
import org.jclouds.date.internal.DateServiceDateCodecFactory; import org.jclouds.date.internal.DateServiceDateCodecFactory;
import org.jclouds.date.internal.SimpleDateFormatDateService; import org.jclouds.date.internal.SimpleDateFormatDateService;
@ -43,6 +41,7 @@ import com.google.appengine.api.urlfetch.HTTPHeader;
import com.google.appengine.api.urlfetch.HTTPResponse; import com.google.appengine.api.urlfetch.HTTPResponse;
import com.google.common.base.Throwables; import com.google.common.base.Throwables;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.net.HttpHeaders;
/** /**
* *

View File

@ -26,7 +26,6 @@ import javax.inject.Named;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.net.ssl.HostnameVerifier; import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.Constants; import org.jclouds.Constants;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
@ -40,6 +39,7 @@ import org.jclouds.io.ContentMetadataCodec;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
import com.google.common.net.HttpHeaders;
import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.ListeningExecutorService;
import com.google.inject.Inject; import com.google.inject.Inject;
import com.squareup.okhttp.OkHttpClient; import com.squareup.okhttp.OkHttpClient;

View File

@ -22,7 +22,6 @@ import static com.google.common.io.BaseEncoding.base64;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.blobstore.binders.BindMapToHeadersWithPrefix; import org.jclouds.blobstore.binders.BindMapToHeadersWithPrefix;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
@ -31,6 +30,7 @@ import org.jclouds.s3.domain.ObjectMetadata;
import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.ImmutableMultimap.Builder; import com.google.common.collect.ImmutableMultimap.Builder;
import com.google.common.net.HttpHeaders;
/** /**
* *

View File

@ -21,7 +21,6 @@ import static com.google.common.base.Preconditions.checkNotNull;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.azureblob.blobstore.functions.AzureBlobToBlob; import org.jclouds.azureblob.blobstore.functions.AzureBlobToBlob;
import org.jclouds.azureblob.domain.AzureBlob; import org.jclouds.azureblob.domain.AzureBlob;
@ -32,6 +31,7 @@ import org.jclouds.rest.Binder;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMap.Builder; import com.google.common.collect.ImmutableMap.Builder;
import com.google.common.collect.Multimaps; import com.google.common.collect.Multimaps;
import com.google.common.net.HttpHeaders;
@Singleton @Singleton
public class BindAzureBlobMetadataToRequest implements Binder { public class BindAzureBlobMetadataToRequest implements Binder {

View File

@ -22,7 +22,6 @@ import java.util.Map.Entry;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Named; import javax.inject.Named;
import javax.ws.rs.core.HttpHeaders;
import org.jclouds.azureblob.domain.ContainerProperties; import org.jclouds.azureblob.domain.ContainerProperties;
import org.jclouds.azureblob.domain.MutableContainerPropertiesWithMetadata; import org.jclouds.azureblob.domain.MutableContainerPropertiesWithMetadata;
@ -37,6 +36,7 @@ import org.jclouds.rest.internal.GeneratedHttpRequest;
import com.google.common.annotations.VisibleForTesting; import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.net.HttpHeaders;
/** /**
* This parses @{link {@link org.jclouds.azureblob.domain.ListableContainerProperties} from * This parses @{link {@link org.jclouds.azureblob.domain.ListableContainerProperties} from