Merge pull request #886 from andrewgaul/local_blob_request_signer

Rename to LocalBlobRequestSigner
This commit is contained in:
Adrian Cole 2012-10-08 06:46:43 -07:00
commit 363d996f19
4 changed files with 9 additions and 10 deletions

View File

@ -22,8 +22,8 @@ import org.jclouds.blobstore.AsyncBlobStore;
import org.jclouds.blobstore.BlobRequestSigner; import org.jclouds.blobstore.BlobRequestSigner;
import org.jclouds.blobstore.BlobStore; import org.jclouds.blobstore.BlobStore;
import org.jclouds.blobstore.LocalAsyncBlobStore; import org.jclouds.blobstore.LocalAsyncBlobStore;
import org.jclouds.blobstore.LocalBlobRequestSigner;
import org.jclouds.blobstore.LocalStorageStrategy; import org.jclouds.blobstore.LocalStorageStrategy;
import org.jclouds.blobstore.TransientBlobRequestSigner;
import org.jclouds.blobstore.attr.ConsistencyModel; import org.jclouds.blobstore.attr.ConsistencyModel;
import org.jclouds.blobstore.config.BlobStoreMapModule; import org.jclouds.blobstore.config.BlobStoreMapModule;
import org.jclouds.blobstore.config.BlobStoreObjectModule; import org.jclouds.blobstore.config.BlobStoreObjectModule;
@ -60,7 +60,7 @@ public class FilesystemBlobStoreContextModule extends AbstractModule {
bind(BlobUtils.class).to(FileSystemBlobUtilsImpl.class); bind(BlobUtils.class).to(FileSystemBlobUtilsImpl.class);
bind(FilesystemBlobKeyValidator.class).to(FilesystemBlobKeyValidatorImpl.class); bind(FilesystemBlobKeyValidator.class).to(FilesystemBlobKeyValidatorImpl.class);
bind(FilesystemContainerNameValidator.class).to(FilesystemContainerNameValidatorImpl.class); bind(FilesystemContainerNameValidator.class).to(FilesystemContainerNameValidatorImpl.class);
bind(BlobRequestSigner.class).to(TransientBlobRequestSigner.class); bind(BlobRequestSigner.class).to(LocalBlobRequestSigner.class);
} }
} }

View File

@ -36,19 +36,18 @@ import org.jclouds.location.Provider;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
/** /**
*
* @author Adrian Cole * @author Adrian Cole
*/ */
@Singleton @Singleton
public class TransientBlobRequestSigner implements BlobRequestSigner { public class LocalBlobRequestSigner implements BlobRequestSigner {
private final BasicAuthentication basicAuth; private final BasicAuthentication basicAuth;
private final BlobToHttpGetOptions blob2HttpGetOptions; private final BlobToHttpGetOptions blob2HttpGetOptions;
private final Supplier<URI> endpoint; private final Supplier<URI> endpoint;
private final ContentMetadataCodec contentMetadataCodec; private final ContentMetadataCodec contentMetadataCodec;
@Inject @Inject
public TransientBlobRequestSigner(BasicAuthentication basicAuth, BlobToHttpGetOptions blob2HttpGetOptions, @Provider Supplier<URI> endpoint, public LocalBlobRequestSigner(BasicAuthentication basicAuth, BlobToHttpGetOptions blob2HttpGetOptions, @Provider Supplier<URI> endpoint,
ContentMetadataCodec contentMetadataCodec) { ContentMetadataCodec contentMetadataCodec) {
this.basicAuth = checkNotNull(basicAuth, "basicAuth"); this.basicAuth = checkNotNull(basicAuth, "basicAuth");
this.blob2HttpGetOptions = checkNotNull(blob2HttpGetOptions, "blob2HttpGetOptions"); this.blob2HttpGetOptions = checkNotNull(blob2HttpGetOptions, "blob2HttpGetOptions");
@ -96,4 +95,4 @@ public class TransientBlobRequestSigner implements BlobRequestSigner {
return basicAuth.filter(request); return basicAuth.filter(request);
} }
} }

View File

@ -22,8 +22,8 @@ import org.jclouds.blobstore.AsyncBlobStore;
import org.jclouds.blobstore.BlobRequestSigner; import org.jclouds.blobstore.BlobRequestSigner;
import org.jclouds.blobstore.BlobStore; import org.jclouds.blobstore.BlobStore;
import org.jclouds.blobstore.LocalAsyncBlobStore; import org.jclouds.blobstore.LocalAsyncBlobStore;
import org.jclouds.blobstore.LocalBlobRequestSigner;
import org.jclouds.blobstore.LocalStorageStrategy; import org.jclouds.blobstore.LocalStorageStrategy;
import org.jclouds.blobstore.TransientBlobRequestSigner;
import org.jclouds.blobstore.TransientStorageStrategy; import org.jclouds.blobstore.TransientStorageStrategy;
import org.jclouds.blobstore.attr.ConsistencyModel; import org.jclouds.blobstore.attr.ConsistencyModel;
import org.jclouds.rest.config.BinderUtils; import org.jclouds.rest.config.BinderUtils;
@ -47,7 +47,7 @@ public class TransientBlobStoreContextModule extends AbstractModule {
bind(BlobStore.class).to(LocalBlobStore.class); bind(BlobStore.class).to(LocalBlobStore.class);
bind(ConsistencyModel.class).toInstance(ConsistencyModel.STRICT); bind(ConsistencyModel.class).toInstance(ConsistencyModel.STRICT);
bind(LocalStorageStrategy.class).to(TransientStorageStrategy.class); bind(LocalStorageStrategy.class).to(TransientStorageStrategy.class);
bind(BlobRequestSigner.class).to(TransientBlobRequestSigner.class); bind(BlobRequestSigner.class).to(LocalBlobRequestSigner.class);
} }
} }

View File

@ -36,7 +36,7 @@ import org.testng.annotations.Test;
import com.google.inject.TypeLiteral; import com.google.inject.TypeLiteral;
/** /**
* Tests behavior of {@code TransientBlobRequestSigner} * Tests behavior of {@code LocalBlobRequestSigner}
* *
* @author Adrian Cole * @author Adrian Cole
*/ */