EMMA Coverage Report (generated Mon Oct 17 05:41:20 EDT 2011)
[all classes][org.jclouds.openstack.swift.blobstore.config]

COVERAGE SUMMARY FOR SOURCE FILE [SwiftBlobStoreContextModule.java]

nameclass, %method, %block, %line, %
SwiftBlobStoreContextModule.java100% (2/2)100% (3/3)100% (55/55)100% (9/9)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class SwiftBlobStoreContextModule100% (1/1)100% (2/2)100% (49/49)100% (9/9)
SwiftBlobStoreContextModule (): void 100% (1/1)100% (3/3)100% (1/1)
configure (): void 100% (1/1)100% (46/46)100% (8/8)
     
class SwiftBlobStoreContextModule$1100% (1/1)100% (1/1)100% (6/6)100% (1/1)
SwiftBlobStoreContextModule$1 (SwiftBlobStoreContextModule): void 100% (1/1)100% (6/6)100% (1/1)

1/**
2 * Licensed to jclouds, Inc. (jclouds) under one or more
3 * contributor license agreements.  See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership.  jclouds licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License.  You may obtain a copy of the License at
9 *
10 *   http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied.  See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19package org.jclouds.openstack.swift.blobstore.config;
20 
21import org.jclouds.blobstore.AsyncBlobStore;
22import org.jclouds.blobstore.BlobRequestSigner;
23import org.jclouds.blobstore.BlobStore;
24import org.jclouds.blobstore.BlobStoreContext;
25import org.jclouds.blobstore.attr.ConsistencyModel;
26import org.jclouds.blobstore.config.BlobStoreMapModule;
27import org.jclouds.blobstore.internal.BlobStoreContextImpl;
28import org.jclouds.location.config.JustProviderLocationModule;
29import org.jclouds.openstack.swift.CommonSwiftAsyncClient;
30import org.jclouds.openstack.swift.CommonSwiftClient;
31import org.jclouds.openstack.swift.blobstore.SwiftAsyncBlobStore;
32import org.jclouds.openstack.swift.blobstore.SwiftBlobRequestSigner;
33import org.jclouds.openstack.swift.blobstore.SwiftBlobStore;
34 
35import com.google.inject.AbstractModule;
36import com.google.inject.Scopes;
37import com.google.inject.TypeLiteral;
38 
39/**
40 * Configures the {@link CloudFilesBlobStoreContext}; requires {@link SwiftAsyncBlobStore}
41 * bound.
42 * 
43 * @author Adrian Cole
44 */
45public class SwiftBlobStoreContextModule extends AbstractModule {
46 
47   @Override
48   protected void configure() {
49      install(new BlobStoreMapModule());
50      install(new JustProviderLocationModule());
51      bind(ConsistencyModel.class).toInstance(ConsistencyModel.STRICT);
52      bind(AsyncBlobStore.class).to(SwiftAsyncBlobStore.class).in(Scopes.SINGLETON);
53      bind(BlobStore.class).to(SwiftBlobStore.class).in(Scopes.SINGLETON);
54      bind(BlobStoreContext.class).to(new TypeLiteral<BlobStoreContextImpl<CommonSwiftClient, CommonSwiftAsyncClient>>() {
55      }).in(Scopes.SINGLETON);
56      bind(BlobRequestSigner.class).to(SwiftBlobRequestSigner.class);
57   }
58 
59 
60}

[all classes][org.jclouds.openstack.swift.blobstore.config]
EMMA 2.0.5312 (C) Vladimir Roubtsov