2 // Getdown - application installer, patcher and launcher
3 // Copyright (C) 2004-2016 Getdown authors
4 // https://github.com/threerings/getdown/blob/master/LICENSE
6 package com.threerings.getdown.data;
8 import java.util.Arrays;
11 import com.threerings.getdown.util.StringUtil;
14 * Contains static data provided during the build process.
18 /** The date and time at which the code was built: in {@code yyyy-MM-dd HH:mm} format. */
19 public static String time () {
20 return "@build_time@";
23 /** The Maven version of the Getdown project. */
24 public static String version () {
25 return "@build_version@";
29 * <p>The hosts which Getdown is allowed to communicate with. An empty list indicates that
30 * no whitelist is configured and there are no limitations. By default, no host whitelist
31 * is added to the binary, so it can be used to download and run applications from any
34 * <p>To create a custom Getdown build that can only talk to whitelisted servers, set
35 * the {@code getdown.host.whitelist} property on the command line while building the JAR
36 * (e.g. {@code mvn package -Dgetdown.host.whitelist=my.server.com}). Wildcards can be used
37 * (e.g. {@code *.mycompany.com}) and multiple values can be separated by commas
38 * (e.g. {@code app1.foo.com,app2.bar.com,app3.baz.com}).
40 public static List<String> hostWhitelist () {
41 return Arrays.asList(StringUtil.parseStringArray("@host_whitelist@"));
45 * <p>The default connect_timeout to use. Overridden by system property of the same name at runtime
47 public static int defaultConnectTimeout () {
49 return Integer.valueOf("@connect_timeout@");
50 } catch (Exception e) {
56 * <p>The default read_timeout to use. Overridden by system property of the same name at runtime
58 public static int defaultReadTimeout () {
60 return Integer.valueOf("@read_timeout@");
61 } catch (Exception e) {
67 * <p>Whether to allow the local "file://" scheme for appbase
69 public static boolean allowLocatorFileProtocol() {
71 return Boolean.valueOf("@allow_file_protocol@");
72 } catch (Exception e) {