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