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

COVERAGE SUMMARY FOR SOURCE FILE [GoGridParserModule.java]

nameclass, %method, %block, %line, %
GoGridParserModule.java100% (1/1)100% (3/3)100% (84/84)100% (15/15)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class GoGridParserModule100% (1/1)100% (3/3)100% (84/84)100% (15/15)
GoGridParserModule (): void 100% (1/1)100% (3/3)100% (1/1)
configure (): void 100% (1/1)100% (7/7)100% (2/2)
provideCustomAdapterBindings (): Map 100% (1/1)100% (74/74)100% (12/12)

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.gogrid.config;
20 
21import java.lang.reflect.Type;
22import java.util.Map;
23 
24import javax.inject.Singleton;
25 
26import org.jclouds.gogrid.domain.IpState;
27import org.jclouds.gogrid.domain.JobState;
28import org.jclouds.gogrid.domain.LoadBalancerOs;
29import org.jclouds.gogrid.domain.LoadBalancerPersistenceType;
30import org.jclouds.gogrid.domain.LoadBalancerState;
31import org.jclouds.gogrid.domain.LoadBalancerType;
32import org.jclouds.gogrid.domain.ObjectType;
33import org.jclouds.gogrid.domain.ServerImageState;
34import org.jclouds.gogrid.domain.ServerImageType;
35import org.jclouds.gogrid.domain.ServerState;
36import org.jclouds.gogrid.functions.internal.CustomDeserializers;
37import org.jclouds.json.config.GsonModule.DateAdapter;
38 
39import com.google.common.collect.Maps;
40import com.google.inject.AbstractModule;
41import com.google.inject.Provides;
42 
43/**
44 * Configures the GoGrid connection.
45 * 
46 * @author Adrian Cole
47 * @author Oleksiy Yarmula
48 */
49 
50public class GoGridParserModule extends AbstractModule {
51 
52   @Provides
53   @Singleton
54   public Map<Type, Object> provideCustomAdapterBindings() {
55      Map<Type, Object> bindings = Maps.newHashMap();
56      bindings.put(ObjectType.class, new CustomDeserializers.ObjectTypeAdapter());
57      bindings.put(LoadBalancerOs.class, new CustomDeserializers.LoadBalancerOsAdapter());
58      bindings.put(LoadBalancerState.class, new CustomDeserializers.LoadBalancerStateAdapter());
59      bindings.put(LoadBalancerPersistenceType.class, new CustomDeserializers.LoadBalancerPersistenceTypeAdapter());
60      bindings.put(LoadBalancerType.class, new CustomDeserializers.LoadBalancerTypeAdapter());
61      bindings.put(ServerState.class, new CustomDeserializers.ServerStateAdapter());
62      bindings.put(IpState.class, new CustomDeserializers.IpStateAdapter());
63      bindings.put(JobState.class, new CustomDeserializers.JobStateAdapter());
64      bindings.put(ServerImageState.class, new CustomDeserializers.ServerImageStateAdapter());
65      bindings.put(ServerImageType.class, new CustomDeserializers.ServerImageTypeAdapter());
66      return bindings;
67   }
68 
69   @Override
70   protected void configure() {
71      bind(DateAdapter.class).to(DateSecondsAdapter.class);
72   }
73 
74}

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