Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.pkg.client
Class SystemInfo

    java.lang.Object
      com.sun.pkg.client.SystemInfo

    public class SystemInfo

extends java.lang.Object

`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.net.Proxy` | `getProxy()` Obtain proxy 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

### SystemInfo

    public SystemInfo()

Method Detail

### getProxy

    public static java.net.Proxy getProxy()

  Obtain proxy based on the updatetool preferences.

  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.

  Returns:
    a Proxy object
  Throws:
    `java.lang.Exception` - - for various errors in reading the files

### getUpdateCheckFrequency

    public static SystemInfo.UpdateCheckFrequency getUpdateCheckFrequency()

  Obtain the update check frequency based on the updatetool preferences.

  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 DAILY.

  Returns:
    an UpdateCheckFrequency

### initUpdateToolProps

    public static void initUpdateToolProps(java.util.Properties props)
                                    throws java.lang.Exception

  Initialize the updatetool preferences from properties.

  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:

  - optin.update.notification
  - optin.usage.reporting
  - image.path
  - proxy.URL

  Parameters:
    `props` - - values to use for writing the file
  Throws:
    `java.lang.Exception`

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD