|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.pkg.client.SystemInfo
public class SystemInfo
SystemInfo
provides access to system information related to the
pkg(5) Java API. This includes information related to the updatetool GUI and
bootstrap programs that are built on top of this API. This class can be used
to read and write information.
Nested Class Summary | |
---|---|
static class |
SystemInfo.UpdateCheckFrequency
|
Constructor Summary | |
---|---|
SystemInfo()
|
Method Summary | |
---|---|
static java.lang.String |
getCanonicalOSArch()
Get the bitness of the OS. |
static java.lang.String |
getOSBitness()
Get the bitness of the OS. |
static java.net.Proxy |
getProxy()
Obtain proxy based on the updatetool preferences. |
static java.net.ProxySelector |
getProxySelector()
Obtain a ProxySelector based on the updatetool preferences. |
static SystemInfo.UpdateCheckFrequency |
getUpdateCheckFrequency()
Obtain the update check frequency based on the updatetool preferences. |
static void |
initUpdateToolProps(java.util.Properties props)
Initialize the updatetool preferences from properties. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SystemInfo()
Method Detail |
---|
public static java.lang.String getOSBitness()
public static java.lang.String getCanonicalOSArch()
public static java.net.ProxySelector getProxySelector()
This method returns a ProxySelector
based on the information
stored in the updatetool preferences. Proxies returned form this ProxySelector
may be null if updatetool is using system proxy settings that are not stored
in the updatetool preferences file. To mimic the behavior of
using the system proxy settings in Java, use the java.net.useSystemProxies
system property.
If unable to read the proxy information or if the proxy information is
invalid, a ProxySelector is returned that will yield null Proxies and
error information is logged.
public static java.net.Proxy getProxy()
This method returns a Proxy
based on the information
stored in the updatetool preferences. This method may return null if
updatetool is using system proxy settings that are not stored in the
updatetool preferences file. To mimic the behavior of
using the system proxy settings in Java, use the java.net.useSystemProxies
system property.
If unable to read the proxy information or if the proxy information is
invalid, null is returned and error information is logged.
public static SystemInfo.UpdateCheckFrequency getUpdateCheckFrequency()
If the user has opted out of update notifications, NEVER is returned. Otherwise the value for the update check frequence is returned. If there is no setting, the default value is WEEKLY.
public static void initUpdateToolProps(java.util.Properties props) throws java.lang.Exception
This method passes preferences information to the updatetool program by writing values to an updatetool initialization configuration file. When updatetool next runs, it merges the initialization information into its preferences file.
The properties recognized from the props object are:
props
- - values to use for writing the file
java.lang.Exception
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |