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

COVERAGE SUMMARY FOR SOURCE FILE [ServerManagerComputeServiceContextModule.java]

nameclass, %method, %block, %line, %
ServerManagerComputeServiceContextModule.java100% (7/7)100% (8/8)100% (98/98)100% (10/10)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ServerManagerComputeServiceContextModule100% (1/1)100% (2/2)100% (62/62)100% (10/10)
ServerManagerComputeServiceContextModule (): void 100% (1/1)100% (5/5)100% (2/2)
configure (): void 100% (1/1)100% (57/57)100% (8/8)
     
class ServerManagerComputeServiceContextModule$1100% (1/1)100% (1/1)100% (6/6)100% (1/1)
ServerManagerComputeServiceContextModule$1 (ServerManagerComputeServiceContex... 100% (1/1)100% (6/6)100% (1/1)
     
class ServerManagerComputeServiceContextModule$2100% (1/1)100% (1/1)100% (6/6)100% (1/1)
ServerManagerComputeServiceContextModule$2 (ServerManagerComputeServiceContex... 100% (1/1)100% (6/6)100% (1/1)
     
class ServerManagerComputeServiceContextModule$3100% (1/1)100% (1/1)100% (6/6)100% (1/1)
ServerManagerComputeServiceContextModule$3 (ServerManagerComputeServiceContex... 100% (1/1)100% (6/6)100% (1/1)
     
class ServerManagerComputeServiceContextModule$4100% (1/1)100% (1/1)100% (6/6)100% (1/1)
ServerManagerComputeServiceContextModule$4 (ServerManagerComputeServiceContex... 100% (1/1)100% (6/6)100% (1/1)
     
class ServerManagerComputeServiceContextModule$5100% (1/1)100% (1/1)100% (6/6)100% (1/1)
ServerManagerComputeServiceContextModule$5 (ServerManagerComputeServiceContex... 100% (1/1)100% (6/6)100% (1/1)
     
class ServerManagerComputeServiceContextModule$6100% (1/1)100% (1/1)100% (6/6)100% (1/1)
ServerManagerComputeServiceContextModule$6 (ServerManagerComputeServiceContex... 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.servermanager.compute.config;
20 
21import org.jclouds.compute.ComputeServiceAdapter;
22import org.jclouds.compute.config.ComputeServiceAdapterContextModule;
23import org.jclouds.compute.domain.NodeMetadata;
24import org.jclouds.domain.Location;
25import org.jclouds.location.suppliers.OnlyLocationOrFirstZone;
26import org.jclouds.servermanager.Datacenter;
27import org.jclouds.servermanager.Hardware;
28import org.jclouds.servermanager.Image;
29import org.jclouds.servermanager.Server;
30import org.jclouds.servermanager.ServerManager;
31import org.jclouds.servermanager.compute.functions.DatacenterToLocation;
32import org.jclouds.servermanager.compute.functions.ServerManagerHardwareToHardware;
33import org.jclouds.servermanager.compute.functions.ServerManagerImageToImage;
34import org.jclouds.servermanager.compute.functions.ServerToNodeMetadata;
35import org.jclouds.servermanager.compute.strategy.ServerManagerComputeServiceAdapter;
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 ServerManagerComputeServiceContextModule extends
46      ComputeServiceAdapterContextModule<ServerManager, ServerManager, Server, Hardware, Image, Datacenter> {
47 
48   public ServerManagerComputeServiceContextModule() {
49      super(ServerManager.class, ServerManager.class);
50   }
51 
52   @Override
53   protected void configure() {
54      super.configure();
55      bind(new TypeLiteral<ComputeServiceAdapter<Server, Hardware, Image, Datacenter>>() {
56      }).to(ServerManagerComputeServiceAdapter.class);
57      bind(new TypeLiteral<Function<Server, NodeMetadata>>() {
58      }).to(ServerToNodeMetadata.class);
59      bind(new TypeLiteral<Function<Image, org.jclouds.compute.domain.Image>>() {
60      }).to(ServerManagerImageToImage.class);
61      bind(new TypeLiteral<Function<Hardware, org.jclouds.compute.domain.Hardware>>() {
62      }).to(ServerManagerHardwareToHardware.class);
63      bind(new TypeLiteral<Function<Datacenter, Location>>() {
64      }).to(DatacenterToLocation.class);
65      bind(new TypeLiteral<Supplier<Location>>() {
66      }).to(OnlyLocationOrFirstZone.class);
67   }
68}

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