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

COVERAGE SUMMARY FOR SOURCE FILE [ServerStatusOptions.java]

nameclass, %method, %block, %line, %
ServerStatusOptions.java100% (3/3)42%  (5/12)67%  (90/134)46%  (7.4/16)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ServerStatusOptions$Builder100% (1/1)17%  (1/6)19%  (8/43)18%  (2/11)
ServerStatusOptions$Builder (): void 0%   (0/1)0%   (0/3)0%   (0/1)
bandwidth (): ServerStatusOptions 0%   (0/1)0%   (0/8)0%   (0/2)
cpu (): ServerStatusOptions 0%   (0/1)0%   (0/8)0%   (0/2)
disk (): ServerStatusOptions 0%   (0/1)0%   (0/8)0%   (0/2)
memory (): ServerStatusOptions 0%   (0/1)0%   (0/8)0%   (0/2)
state (): ServerStatusOptions 100% (1/1)100% (8/8)100% (2/2)
     
class ServerStatusOptions$StatusTypes100% (1/1)50%  (2/4)88%  (69/78)94%  (1.9/2)
valueOf (String): ServerStatusOptions$StatusTypes 0%   (0/1)0%   (0/5)0%   (0/1)
values (): ServerStatusOptions$StatusTypes [] 0%   (0/1)0%   (0/4)0%   (0/1)
<static initializer> 100% (1/1)100% (64/64)100% (2/2)
ServerStatusOptions$StatusTypes (String, int): void 100% (1/1)100% (5/5)100% (1/1)
     
class ServerStatusOptions100% (1/1)100% (2/2)100% (13/13)100% (4/4)
ServerStatusOptions (): void 100% (1/1)100% (3/3)100% (2/2)
statusType (ServerStatusOptions$StatusTypes): ServerStatusOptions 100% (1/1)100% (10/10)100% (2/2)

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.options;
18 
19import org.jclouds.http.options.BaseHttpRequestOptions;
20 
21/**
22 * @author Adam Lowe
23 */
24public class ServerStatusOptions extends BaseHttpRequestOptions {
25 
26   public enum StatusTypes {
27      STATE, CPU, MEMORY, DISK, BANDWIDTH, UPTIME;
28   }
29 
30   public static class Builder {
31      /**
32       * @see org.jclouds.glesys.options.ServerStatusOptions#statusType
33       */
34      public static ServerStatusOptions state() {
35         ServerStatusOptions options = new ServerStatusOptions();
36         return options.statusType(StatusTypes.STATE);
37      }
38 
39      /**
40       * @see org.jclouds.glesys.options.ServerStatusOptions#statusType
41       */
42      public static ServerStatusOptions cpu() {
43         ServerStatusOptions options = new ServerStatusOptions();
44         return options.statusType(StatusTypes.CPU);
45      }
46 
47      /**
48       * @see org.jclouds.glesys.options.ServerStatusOptions#statusType
49       */
50      public static ServerStatusOptions memory() {
51         ServerStatusOptions options = new ServerStatusOptions();
52         return options.statusType(StatusTypes.MEMORY);
53      }
54 
55      /**
56       * @see org.jclouds.glesys.options.ServerStatusOptions#statusType
57       */
58      public static ServerStatusOptions disk() {
59         ServerStatusOptions options = new ServerStatusOptions();
60         return options.statusType(StatusTypes.DISK);
61      }
62 
63      /**
64       * @see org.jclouds.glesys.options.ServerStatusOptions#statusType
65       */
66      public static ServerStatusOptions bandwidth() {
67         ServerStatusOptions options = new ServerStatusOptions();
68         return options.statusType(StatusTypes.BANDWIDTH);
69      }
70   }
71 
72   /**
73    * Select the given type of information form the server
74    */
75   public ServerStatusOptions statusType(StatusTypes type) {
76      formParameters.put("statustype", type.name().toLowerCase());
77      return this;
78   }
79}

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