EMMA Coverage Report (generated Wed Jun 22 19:47:49 EDT 2011)
[all classes][org.jclouds.gae.config]

COVERAGE SUMMARY FOR SOURCE FILE [GoogleAppEngineConfigurationModule.java]

nameclass, %method, %block, %line, %
GoogleAppEngineConfigurationModule.java100% (1/1)100% (4/4)100% (21/21)100% (7/7)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class GoogleAppEngineConfigurationModule100% (1/1)100% (4/4)100% (21/21)100% (7/7)
GoogleAppEngineConfigurationModule (): void 100% (1/1)100% (5/5)100% (2/2)
configure (): void 100% (1/1)100% (9/9)100% (3/3)
provideURLFetchService (): URLFetchService 100% (1/1)100% (2/2)100% (1/1)
providerHttpCommandExecutorService (Injector): HttpCommandExecutorService 100% (1/1)100% (5/5)100% (1/1)

1/**
2 *
3 * Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
4 *
5 * ====================================================================
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * 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, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 * ====================================================================
18 */
19package org.jclouds.gae.config;
20 
21import javax.inject.Singleton;
22 
23import org.jclouds.concurrent.MoreExecutors;
24import org.jclouds.concurrent.SingleThreaded;
25import org.jclouds.concurrent.config.ConfiguresExecutorService;
26import org.jclouds.concurrent.config.ExecutorServiceModule;
27import org.jclouds.gae.GaeHttpCommandExecutorService;
28import org.jclouds.http.HttpCommandExecutorService;
29import org.jclouds.http.TransformingHttpCommandExecutorService;
30import org.jclouds.http.TransformingHttpCommandExecutorServiceImpl;
31import org.jclouds.http.config.ConfiguresHttpCommandExecutorService;
32 
33import com.google.appengine.api.urlfetch.URLFetchService;
34import com.google.appengine.api.urlfetch.URLFetchServiceFactory;
35import com.google.inject.Injector;
36import com.google.inject.Provides;
37 
38/**
39 * Configures {@link GaeHttpCommandExecutorService}.
40 * 
41 * @author Adrian Cole
42 */
43@ConfiguresHttpCommandExecutorService
44@ConfiguresExecutorService
45@SingleThreaded
46public class GoogleAppEngineConfigurationModule extends ExecutorServiceModule {
47 
48   public GoogleAppEngineConfigurationModule() {
49      super(MoreExecutors.sameThreadExecutor(), MoreExecutors.sameThreadExecutor());
50   }
51 
52   @Override
53   protected void configure() {
54      super.configure();
55      bind(TransformingHttpCommandExecutorService.class).to(TransformingHttpCommandExecutorServiceImpl.class);
56   }
57 
58   @Singleton
59   @Provides
60   protected HttpCommandExecutorService providerHttpCommandExecutorService(Injector injector) {
61      return injector.getInstance(GaeHttpCommandExecutorService.class);
62   }
63 
64   @Provides
65   URLFetchService provideURLFetchService() {
66      return URLFetchServiceFactory.getURLFetchService();
67   }
68}

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