EMMA Coverage Report (generated Wed Aug 10 12:30:04 EDT 2011)
[all classes][org.jclouds.deltacloud.compute.config]

COVERAGE SUMMARY FOR SOURCE FILE [DeltacloudComputeServiceContextModule.java]

nameclass, %method, %block, %line, %
DeltacloudComputeServiceContextModule.java100% (7/7)100% (8/8)100% (98/98)100% (11/11)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DeltacloudComputeServiceContextModule100% (1/1)100% (2/2)100% (62/62)100% (10/10)
DeltacloudComputeServiceContextModule (): void 100% (1/1)100% (5/5)100% (2/2)
configure (): void 100% (1/1)100% (57/57)100% (8/8)
     
class DeltacloudComputeServiceContextModule$1100% (1/1)100% (1/1)100% (6/6)100% (1/1)
DeltacloudComputeServiceContextModule$1 (DeltacloudComputeServiceContextModul... 100% (1/1)100% (6/6)100% (1/1)
     
class DeltacloudComputeServiceContextModule$2100% (1/1)100% (1/1)100% (6/6)100% (1/1)
DeltacloudComputeServiceContextModule$2 (DeltacloudComputeServiceContextModul... 100% (1/1)100% (6/6)100% (1/1)
     
class DeltacloudComputeServiceContextModule$3100% (1/1)100% (1/1)100% (6/6)100% (1/1)
DeltacloudComputeServiceContextModule$3 (DeltacloudComputeServiceContextModul... 100% (1/1)100% (6/6)100% (1/1)
     
class DeltacloudComputeServiceContextModule$4100% (1/1)100% (1/1)100% (6/6)100% (1/1)
DeltacloudComputeServiceContextModule$4 (DeltacloudComputeServiceContextModul... 100% (1/1)100% (6/6)100% (1/1)
     
class DeltacloudComputeServiceContextModule$5100% (1/1)100% (1/1)100% (6/6)100% (1/1)
DeltacloudComputeServiceContextModule$5 (DeltacloudComputeServiceContextModul... 100% (1/1)100% (6/6)100% (1/1)
     
class DeltacloudComputeServiceContextModule$6100% (1/1)100% (1/1)100% (6/6)100% (1/1)
DeltacloudComputeServiceContextModule$6 (DeltacloudComputeServiceContextModul... 100% (1/1)100% (6/6)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.deltacloud.compute.config;
20 
21import org.jclouds.compute.ComputeServiceAdapter;
22import org.jclouds.compute.config.ComputeServiceAdapterContextModule;
23import org.jclouds.compute.domain.NodeMetadata;
24import org.jclouds.deltacloud.DeltacloudAsyncClient;
25import org.jclouds.deltacloud.DeltacloudClient;
26import org.jclouds.deltacloud.compute.functions.DeltacloudImageToImage;
27import org.jclouds.deltacloud.compute.functions.HardwareProfileToHardware;
28import org.jclouds.deltacloud.compute.functions.InstanceToNodeMetadata;
29import org.jclouds.deltacloud.compute.functions.RealmToLocation;
30import org.jclouds.deltacloud.compute.strategy.DeltacloudComputeServiceAdapter;
31import org.jclouds.deltacloud.domain.HardwareProfile;
32import org.jclouds.deltacloud.domain.Instance;
33import org.jclouds.deltacloud.domain.Realm;
34import org.jclouds.domain.Location;
35import org.jclouds.location.suppliers.OnlyLocationOrFirstZone;
36 
37import com.google.common.base.Function;
38import com.google.common.base.Supplier;
39import com.google.inject.TypeLiteral;
40 
41/**
42 * 
43 * @author Adrian Cole
44 */
45public class DeltacloudComputeServiceContextModule
46         extends
47         ComputeServiceAdapterContextModule<DeltacloudClient, DeltacloudAsyncClient, Instance, HardwareProfile, org.jclouds.deltacloud.domain.Image, Realm> {
48 
49   public DeltacloudComputeServiceContextModule() {
50      super(DeltacloudClient.class, DeltacloudAsyncClient.class);
51   }
52 
53   @Override
54   protected void configure() {
55      super.configure();
56      bind(
57               new TypeLiteral<ComputeServiceAdapter<Instance, HardwareProfile, org.jclouds.deltacloud.domain.Image, Realm>>() {
58               }).to(DeltacloudComputeServiceAdapter.class);
59      bind(new TypeLiteral<Function<Instance, NodeMetadata>>() {
60      }).to(InstanceToNodeMetadata.class);
61      bind(new TypeLiteral<Function<org.jclouds.deltacloud.domain.Image, org.jclouds.compute.domain.Image>>() {
62      }).to(DeltacloudImageToImage.class);
63      bind(new TypeLiteral<Function<HardwareProfile, org.jclouds.compute.domain.Hardware>>() {
64      }).to(HardwareProfileToHardware.class);
65      bind(new TypeLiteral<Function<Realm, Location>>() {
66      }).to(RealmToLocation.class);
67      bind(new TypeLiteral<Supplier<Location>>() {
68      }).to(OnlyLocationOrFirstZone.class);
69   }
70}

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