EMMA Coverage Report (generated Mon Dec 09 15:12:29 EST 2013)
[all classes][org.jclouds.glesys.compute.config]

COVERAGE SUMMARY FOR SOURCE FILE [GleSYSComputeServiceContextModule.java]

nameclass, %method, %block, %line, %
GleSYSComputeServiceContextModule.java100% (8/8)100% (9/9)100% (117/117)100% (11/11)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class GleSYSComputeServiceContextModule100% (1/1)100% (2/2)100% (75/75)100% (11/11)
GleSYSComputeServiceContextModule (): void 100% (1/1)100% (3/3)100% (1/1)
configure (): void 100% (1/1)100% (72/72)100% (10/10)
     
class GleSYSComputeServiceContextModule$1100% (1/1)100% (1/1)100% (6/6)100% (1/1)
GleSYSComputeServiceContextModule$1 (GleSYSComputeServiceContextModule): void 100% (1/1)100% (6/6)100% (1/1)
     
class GleSYSComputeServiceContextModule$2100% (1/1)100% (1/1)100% (6/6)100% (1/1)
GleSYSComputeServiceContextModule$2 (GleSYSComputeServiceContextModule): void 100% (1/1)100% (6/6)100% (1/1)
     
class GleSYSComputeServiceContextModule$3100% (1/1)100% (1/1)100% (6/6)100% (1/1)
GleSYSComputeServiceContextModule$3 (GleSYSComputeServiceContextModule): void 100% (1/1)100% (6/6)100% (1/1)
     
class GleSYSComputeServiceContextModule$4100% (1/1)100% (1/1)100% (6/6)100% (1/1)
GleSYSComputeServiceContextModule$4 (GleSYSComputeServiceContextModule): void 100% (1/1)100% (6/6)100% (1/1)
     
class GleSYSComputeServiceContextModule$5100% (1/1)100% (1/1)100% (6/6)100% (1/1)
GleSYSComputeServiceContextModule$5 (GleSYSComputeServiceContextModule): void 100% (1/1)100% (6/6)100% (1/1)
     
class GleSYSComputeServiceContextModule$6100% (1/1)100% (1/1)100% (6/6)100% (1/1)
GleSYSComputeServiceContextModule$6 (GleSYSComputeServiceContextModule): void 100% (1/1)100% (6/6)100% (1/1)
     
class GleSYSComputeServiceContextModule$7100% (1/1)100% (1/1)100% (6/6)100% (1/1)
GleSYSComputeServiceContextModule$7 (GleSYSComputeServiceContextModule): void 100% (1/1)100% (6/6)100% (1/1)

1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *     http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17package org.jclouds.glesys.compute.config;
18 
19import org.jclouds.compute.ComputeServiceAdapter;
20import org.jclouds.compute.config.ComputeServiceAdapterContextModule;
21import org.jclouds.compute.domain.Hardware;
22import org.jclouds.compute.domain.NodeMetadata;
23import org.jclouds.compute.domain.OsFamilyVersion64Bit;
24import org.jclouds.compute.options.TemplateOptions;
25import org.jclouds.domain.Location;
26import org.jclouds.functions.IdentityFunction;
27import org.jclouds.glesys.compute.GleSYSComputeServiceAdapter;
28import org.jclouds.glesys.compute.functions.DatacenterToLocation;
29import org.jclouds.glesys.compute.functions.OSTemplateToImage;
30import org.jclouds.glesys.compute.functions.ParseOsFamilyVersion64BitFromImageName;
31import org.jclouds.glesys.compute.functions.ServerDetailsToNodeMetadata;
32import org.jclouds.glesys.compute.options.GleSYSTemplateOptions;
33import org.jclouds.glesys.domain.OSTemplate;
34import org.jclouds.glesys.domain.ServerDetails;
35 
36import com.google.common.base.Function;
37import com.google.inject.TypeLiteral;
38 
39/**
40 * 
41 * @author Adrian Cole
42 */
43public class GleSYSComputeServiceContextModule extends
44         ComputeServiceAdapterContextModule<ServerDetails, Hardware, OSTemplate, String> {
45 
46   @SuppressWarnings("unchecked")
47   @Override
48   protected void configure() {
49      super.configure();
50      bind(new TypeLiteral<ComputeServiceAdapter<ServerDetails, Hardware, OSTemplate, String>>() {
51      }).to(GleSYSComputeServiceAdapter.class);
52      bind(new TypeLiteral<Function<ServerDetails, NodeMetadata>>() {
53      }).to(ServerDetailsToNodeMetadata.class);
54      bind(new TypeLiteral<Function<OSTemplate, org.jclouds.compute.domain.Image>>() {
55      }).to(OSTemplateToImage.class);
56      bind(new TypeLiteral<Function<Hardware, Hardware>>() {
57      }).to(Class.class.cast(IdentityFunction.class));
58      bind(new TypeLiteral<Function<String, Location>>() {
59      }).to(DatacenterToLocation.class);
60      bind(new TypeLiteral<Function<String, OsFamilyVersion64Bit>>() {
61      }).to(ParseOsFamilyVersion64BitFromImageName.class);
62      bind(TemplateOptions.class).to(GleSYSTemplateOptions.class);
63      install(new LocationsFromComputeServiceAdapterModule<ServerDetails, Hardware, OSTemplate, String>(){});
64   }
65 
66}

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