public class SysProps extends Object
System.getProperty randomly into the code, put it in here and give it an
accessor so that it's easy to see all of the secret system property arguments that Getdown makes
use of.| Constructor and Description |
|---|
SysProps() |
| Modifier and Type | Method and Description |
|---|---|
static String |
appBase()
Configures the appbase (in lieu of providing a skeleton getdown.txt, and as a last resort
fallback).
|
static String |
appbaseDomain()
Overrides the domain on
appbase. |
static String |
appDir()
Configures the appdir (in lieu of passing it in argv).
|
static String |
appId()
Configures the appid (in lieu of passing it in argv).
|
static int |
connectTimeout()
Specifies the connection timeout (in seconds) to use when downloading control files from
the server.
|
static boolean |
direct()
If true, Getdown will run the application in the same VM in which Getdown is running.
|
static boolean |
launchInSilent()
If true, Getdown installs the app without ever bringing up a UI and then launches it.
|
static boolean |
noLogRedir()
If true, disables redirection of logging into
launcher.log. |
static boolean |
noUnpack()
If true, Getdown will not unpack
uresource jars. |
static long |
parseJavaVersion(String propName,
String propRegex)
Parses a Java version system property using the supplied regular expression.
|
static boolean |
silent()
If true, Getdown installs the app without ever bringing up a UI, except in the event of an
error.
|
static int |
startDelay()
Specifies the a delay (in minutes) to wait before starting the update and install process.
|
public static String appDir()
-Dappdir=foo.public static String appId()
-Dappid=foo.public static String appBase()
-Dappbase=someurl.public static boolean noLogRedir()
launcher.log.
Usage: -Dno_log_redir.public static String appbaseDomain()
appbase. Usage: -Dappbase_domain=foo.public static boolean silent()
launchInSilent().
Usage: -Dsilent.public static boolean launchInSilent()
-Dsilent=launch.public static int startDelay()
-Ddelay=N.public static boolean noUnpack()
uresource jars. Usage: -Dno_unpack.public static boolean direct()
-Ddirect.public static int connectTimeout()
-Dconnect_timeout=N.public static long parseJavaVersion(String propName, String propRegex)
For example, java.version takes the form 1.8.0_31, and with the regexp
(\d+)\.(\d+)\.(\d+)(_\d+)? we would parse 1, 8, 0, 31 and combine them into
the final value 1080031.
Note that non-numeric characters matched by the regular expression will simply be ignored, and optional groups which do not match are treated as zero in the final version calculation.
One can instead parse java.runtime.version which takes the form 1.8.0_31-b13. Using regexp (\d+)\.(\d+)\.(\d+)_(\d+)-b(\d+) we would parse
1, 8, 0, 31, 13 and combine them into a final value 108003113.
Other (or future) JVMs may provide different version properties which can be parsed as desired using this general scheme as long as the numbers appear from left to right in order of significance.
IllegalArgumentException - if no system named propName exists, or if
propRegex does not match the returned version string.Copyright © 2015. All rights reserved.