EMMA Coverage Report (generated Wed Oct 26 13:47:17 EDT 2011)
[all classes][org.jclouds.compute.internal]

COVERAGE SUMMARY FOR SOURCE FILE [UtilsImpl.java]

nameclass, %method, %block, %line, %
UtilsImpl.java100% (1/1)25%  (1/4)61%  (14/23)50%  (3/6)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class UtilsImpl100% (1/1)25%  (1/4)61%  (14/23)50%  (3/6)
getSshClientFactory (): SshClient$Factory 0%   (0/1)0%   (0/3)0%   (0/1)
sshFactory (): SshClient$Factory 0%   (0/1)0%   (0/3)0%   (0/1)
sshForNode (): Function 0%   (0/1)0%   (0/3)0%   (0/1)
UtilsImpl (Json, HttpClient, HttpAsyncClient, Crypto, DateService, ExecutorSe... 100% (1/1)100% (14/14)100% (3/3)

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.compute.internal;
20 
21import java.util.concurrent.ExecutorService;
22 
23import javax.inject.Named;
24import javax.inject.Singleton;
25 
26import org.jclouds.Constants;
27import org.jclouds.compute.Utils;
28import org.jclouds.compute.domain.NodeMetadata;
29import org.jclouds.crypto.Crypto;
30import org.jclouds.date.DateService;
31import org.jclouds.json.Json;
32import org.jclouds.logging.Logger.LoggerFactory;
33import org.jclouds.rest.HttpAsyncClient;
34import org.jclouds.rest.HttpClient;
35import org.jclouds.ssh.SshClient;
36import org.jclouds.ssh.SshClient.Factory;
37 
38import com.google.common.base.Function;
39import com.google.inject.Inject;
40 
41/**
42 * 
43 * @author Adrian Cole
44 */
45@Singleton
46public class UtilsImpl extends org.jclouds.rest.internal.UtilsImpl implements Utils {
47   @Inject(optional = true)
48   private Factory sshFactory;
49   private final Function<NodeMetadata, SshClient> sshForNode;
50 
51   @Inject
52   UtilsImpl(Json json, HttpClient simpleClient, HttpAsyncClient simpleAsyncClient, Crypto encryption,
53         DateService date, @Named(Constants.PROPERTY_USER_THREADS) ExecutorService userThreads,
54         @Named(Constants.PROPERTY_IO_WORKER_THREADS) ExecutorService ioThreads, LoggerFactory loggerFactory,
55         Function<NodeMetadata, SshClient> sshForNode) {
56      super(json, simpleClient, simpleAsyncClient, encryption, date, userThreads, ioThreads, loggerFactory);
57      this.sshForNode = sshForNode;
58   }
59 
60   @Override
61   public Factory getSshClientFactory() {
62      return sshFactory;
63   }
64 
65   @Override
66   public Factory sshFactory() {
67      return sshFactory;
68   }
69 
70   @Override
71   public Function<NodeMetadata, SshClient> sshForNode() {
72      return sshForNode;
73   }
74 
75}

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