EMMA Coverage Report (generated Mon Oct 17 05:41:20 EDT 2011)
[all classes][org.jclouds.cloudsigma.domain]

COVERAGE SUMMARY FOR SOURCE FILE [VNC.java]

nameclass, %method, %block, %line, %
VNC.java100% (1/1)86%  (6/7)68%  (99/146)70%  (24.7/35)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class VNC100% (1/1)86%  (6/7)68%  (99/146)70%  (24.7/35)
toString (): String 0%   (0/1)0%   (0/22)0%   (0/1)
equals (Object): boolean 100% (1/1)68%  (41/60)55%  (11/20)
hashCode (): int 100% (1/1)86%  (37/43)94%  (5.7/6)
VNC (String, String, boolean): void 100% (1/1)100% (12/12)100% (5/5)
getIp (): String 100% (1/1)100% (3/3)100% (1/1)
getPassword (): String 100% (1/1)100% (3/3)100% (1/1)
isTls (): boolean 100% (1/1)100% (3/3)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.cloudsigma.domain;
20 
21import org.jclouds.javax.annotation.Nullable;
22 
23/**
24 * 
25 * @author Adrian Cole
26 */
27public class VNC {
28   @Nullable
29   private final String ip;
30   @Nullable
31   private final String password;
32   private final boolean tls;
33 
34   public VNC(String ip, String password, boolean tls) {
35      this.ip = ip;
36      this.password = password;
37      this.tls = tls;
38   }
39 
40   /**
41    * 
42    * @return IP address for overlay VNC access on port 5900. Set to 'auto', to reuse nic:0:dhcp if
43    *         available, or otherwise allocate a temporary IP at boot.
44    */
45   public String getIp() {
46      return ip;
47   }
48 
49   /**
50    * 
51    * @return Password for VNC access. If unset, VNC is disabled.
52    */
53   public String getPassword() {
54      return password;
55   }
56 
57   /**
58    * 
59    * @return Set to 'on' to require VeNCrypt-style TLS auth in addition to the password. If this is
60    *         unset, only unencrypted VNC is available.
61    */
62   public boolean isTls() {
63      return tls;
64   }
65 
66   @Override
67   public int hashCode() {
68      final int prime = 31;
69      int result = 1;
70      result = prime * result + ((ip == null) ? 0 : ip.hashCode());
71      result = prime * result + ((password == null) ? 0 : password.hashCode());
72      result = prime * result + (tls ? 1231 : 1237);
73      return result;
74   }
75 
76   @Override
77   public boolean equals(Object obj) {
78      if (this == obj)
79         return true;
80      if (obj == null)
81         return false;
82      if (getClass() != obj.getClass())
83         return false;
84      VNC other = (VNC) obj;
85      if (ip == null) {
86         if (other.ip != null)
87            return false;
88      } else if (!ip.equals(other.ip))
89         return false;
90      if (password == null) {
91         if (other.password != null)
92            return false;
93      } else if (!password.equals(other.password))
94         return false;
95      if (tls != other.tls)
96         return false;
97      return true;
98   }
99 
100   @Override
101   public String toString() {
102      return "[ip=" + ip + ", password=" + password + ", tls=" + tls + "]";
103   }
104}

[all classes][org.jclouds.cloudsigma.domain]
EMMA 2.0.5312 (C) Vladimir Roubtsov