EMMA Coverage Report (generated Mon Oct 17 05:41:20 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 * 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.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