|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.util.ProxySetup
public class ProxySetup
A singleton class for controlling the configuration of the web proxy system properties. The values are stored as Preferences associated with this class and can be restored to the related System properties "http.proxySet", "http.proxyHost", "http.proxyPort" and nonProxyHosts and saved back again.
To enable any stored proxy setup just do:
ProxySetup.getInstance().restore();Sometime during application startup. Note that this will supercede any system properties already set (but only if any Preferences have been defined).
Method Summary | |
---|---|
static ProxySetup |
getInstance()
Get a reference to the only instance of this class. |
java.lang.String |
getNonProxyHosts()
Get the hosts that should not be proxied. |
java.lang.String |
getProxyHost()
Get the proxy host. |
java.lang.String |
getProxyPort()
Get the proxy port. |
boolean |
isProxySet()
Get if proxy use is enabled. |
void |
restore()
Restore from backing store, updating the system properties. |
void |
setNonProxyHosts(java.lang.String nohosts)
Set the hosts that shouldn't use the proxy. |
void |
setProxyHost(java.lang.String host)
Set the proxy host. |
void |
setProxyPort(java.lang.String port)
Set the proxy port. |
void |
setProxySet(boolean set)
Set if proxy use is enabled. |
void |
store()
Save state of system properties to backing store. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ProxySetup getInstance()
public boolean isProxySet()
public void setProxySet(boolean set)
public java.lang.String getProxyHost()
public void setProxyHost(java.lang.String host)
public java.lang.String getProxyPort()
public void setProxyPort(java.lang.String port)
public java.lang.String getNonProxyHosts()
public void setNonProxyHosts(java.lang.String nohosts)
public void restore()
public void store()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |