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

COVERAGE SUMMARY FOR SOURCE FILE [CloudFilesRestClientModule.java]

nameclass, %method, %block, %line, %
CloudFilesRestClientModule.java0%   (0/1)0%   (0/4)0%   (0/15)0%   (0/5)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CloudFilesRestClientModule0%   (0/1)0%   (0/4)0%   (0/15)0%   (0/5)
CloudFilesRestClientModule (): void 0%   (0/1)0%   (0/5)0%   (0/2)
provideCDNUrl (OpenStackAuthAsyncClient$AuthenticationResponse): URI 0%   (0/1)0%   (0/6)0%   (0/1)
provideCommonSwiftClient (CloudFilesAsyncClient): CommonSwiftAsyncClient 0%   (0/1)0%   (0/2)0%   (0/1)
provideCommonSwiftClient (CloudFilesClient): CommonSwiftClient 0%   (0/1)0%   (0/2)0%   (0/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.cloudfiles.config;
20 
21import java.net.URI;
22 
23import javax.inject.Singleton;
24 
25import org.jclouds.cloudfiles.CDNManagement;
26import org.jclouds.cloudfiles.CloudFilesAsyncClient;
27import org.jclouds.cloudfiles.CloudFilesClient;
28import org.jclouds.http.RequiresHttp;
29import org.jclouds.openstack.OpenStackAuthAsyncClient.AuthenticationResponse;
30import org.jclouds.openstack.reference.AuthHeaders;
31import org.jclouds.openstack.swift.CommonSwiftAsyncClient;
32import org.jclouds.openstack.swift.CommonSwiftClient;
33import org.jclouds.openstack.swift.config.BaseSwiftRestClientModule;
34import org.jclouds.rest.ConfiguresRestClient;
35 
36import com.google.inject.Provides;
37 
38/**
39 * 
40 * @author Adrian Cole
41 */
42@ConfiguresRestClient
43@RequiresHttp
44public class CloudFilesRestClientModule extends BaseSwiftRestClientModule<CloudFilesClient, CloudFilesAsyncClient> {
45 
46   public CloudFilesRestClientModule() {
47      super(CloudFilesClient.class, CloudFilesAsyncClient.class);
48   }
49 
50   @Provides
51   @Singleton
52   CommonSwiftClient provideCommonSwiftClient(CloudFilesClient in) {
53      return in;
54   }
55 
56   @Provides
57   @Singleton
58   CommonSwiftAsyncClient provideCommonSwiftClient(CloudFilesAsyncClient in) {
59      return in;
60   }
61 
62   @Provides
63   @Singleton
64   @CDNManagement
65   protected URI provideCDNUrl(AuthenticationResponse response) {
66      return response.getServices().get(AuthHeaders.CDN_MANAGEMENT_URL);
67   }
68}

[all classes][org.jclouds.cloudfiles.config]
EMMA 2.0.5312 (C) Vladimir Roubtsov