diff options
author | Björn Hagemeister | 2014-11-12 16:14:16 +0100 |
---|---|---|
committer | Björn Hagemeister | 2014-11-12 16:14:16 +0100 |
commit | f9414e539ed6d16dedfa6e7f55206f4d6aed6246 (patch) | |
tree | d19cfab55dc86339ba8b9ab0d5b909ad390b180a /src/main/java/org/openslx/satserver | |
parent | bwlehrpool user was renamed (diff) | |
download | tmlite-bwlp-f9414e539ed6d16dedfa6e7f55206f4d6aed6246.tar.gz tmlite-bwlp-f9414e539ed6d16dedfa6e7f55206f4d6aed6246.tar.xz tmlite-bwlp-f9414e539ed6d16dedfa6e7f55206f4d6aed6246.zip |
Added class ProxyHandler for for configuring proxy settings system wide once before starting downloading.
Diffstat (limited to 'src/main/java/org/openslx/satserver')
-rw-r--r-- | src/main/java/org/openslx/satserver/util/ProxyHandler.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/satserver/util/ProxyHandler.java b/src/main/java/org/openslx/satserver/util/ProxyHandler.java new file mode 100644 index 0000000..9a702fe --- /dev/null +++ b/src/main/java/org/openslx/satserver/util/ProxyHandler.java @@ -0,0 +1,21 @@ +package org.openslx.satserver.util; + +import org.openslx.network.ProxyConfiguration; + +/** + * Class for handling proxy configuration in task manager. Just configure proxy + * setting system wide, if it was not done already. + * @author bjoern + * + */ +public class ProxyHandler { + private static boolean hasDoneConfigProxy = false; + + public static void configProxy() { + // Just configuring proxy settings system wide, if not done already. + if (!hasDoneConfigProxy) { + ProxyConfiguration.configProxy(); + hasDoneConfigProxy = true; + } + } +} |