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

COVERAGE SUMMARY FOR SOURCE FILE [RimuHostingPropertiesBuilder.java]

nameclass, %method, %block, %line, %
RimuHostingPropertiesBuilder.java100% (1/1)100% (2/2)100% (94/94)100% (18/18)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class RimuHostingPropertiesBuilder100% (1/1)100% (2/2)100% (94/94)100% (18/18)
RimuHostingPropertiesBuilder (Properties): void 100% (1/1)100% (4/4)100% (2/2)
defaultProperties (): Properties 100% (1/1)100% (90/90)100% (16/16)

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.rimuhosting.miro;
20 
21import static org.jclouds.Constants.PROPERTY_API_VERSION;
22import static org.jclouds.Constants.PROPERTY_CONNECTION_TIMEOUT;
23import static org.jclouds.Constants.PROPERTY_ENDPOINT;
24import static org.jclouds.Constants.PROPERTY_ISO3166_CODES;
25import static org.jclouds.Constants.PROPERTY_SO_TIMEOUT;
26import static org.jclouds.location.reference.LocationConstants.ISO3166_CODES;
27import static org.jclouds.location.reference.LocationConstants.PROPERTY_ZONE;
28import static org.jclouds.location.reference.LocationConstants.PROPERTY_ZONES;
29import static org.jclouds.rimuhosting.miro.reference.RimuHostingConstants.PROPERTY_RIMUHOSTING_DEFAULT_DC;
30 
31import java.util.Properties;
32 
33import org.jclouds.PropertiesBuilder;
34import org.jclouds.compute.reference.ComputeServiceConstants;
35import org.jclouds.concurrent.Timeout;
36 
37/**
38 * Builds properties used in RimuHosting Clients
39 * 
40 * @author Adrian Cole
41 */
42public class RimuHostingPropertiesBuilder extends PropertiesBuilder {
43   @Override
44   protected Properties defaultProperties() {
45      Properties properties = super.defaultProperties();
46      properties.setProperty(PROPERTY_ZONES, "DCAUCKLAND,DCLONDON,DCDALLAS,DCSYDNEY");
47      properties.setProperty(PROPERTY_ISO3166_CODES, "NZ-AUK,US-TX,AU-NSW,GB-LND");
48      properties.setProperty(PROPERTY_ZONE + ".DCAUCKLAND." + ISO3166_CODES, "NZ-AUK");
49      properties.setProperty(PROPERTY_ZONE + ".DCLONDON." + ISO3166_CODES, "GB-LND");
50      properties.setProperty(PROPERTY_ZONE + ".DCDALLAS." + ISO3166_CODES, "US-TX");
51      properties.setProperty(PROPERTY_ZONE + ".DCSYDNEY." + ISO3166_CODES, "AU-NSW");
52      properties.setProperty(PROPERTY_API_VERSION, "TODO");
53      properties.setProperty(PROPERTY_ENDPOINT, "https://api.rimuhosting.com/r");
54      properties.setProperty(PROPERTY_RIMUHOSTING_DEFAULT_DC, "DCDALLAS");
55      Timeout timeout = RimuHostingClient.class.getAnnotation(Timeout.class);
56      long timeoutMillis = timeout.timeUnit().toMillis(timeout.duration());
57      properties.setProperty(PROPERTY_SO_TIMEOUT, timeoutMillis + "");
58      properties.setProperty(PROPERTY_CONNECTION_TIMEOUT, timeoutMillis + "");
59      properties.setProperty(ComputeServiceConstants.PROPERTY_TIMEOUT_NODE_TERMINATED, 60 * 1000 + "");
60      return properties;
61   }
62 
63   public RimuHostingPropertiesBuilder(Properties properties) {
64      super(properties);
65   }
66}

[all classes][org.jclouds.rimuhosting.miro]
EMMA 2.0.5312 (C) Vladimir Roubtsov