MacProxyManager (Selenium RC Server (Coreless) 1.0.1 API)
Date: 2009-06-09

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

## org.openqa.selenium.server.browserlaunchers
Class MacProxyManager

    java.lang.Object
      org.openqa.selenium.server.browserlaunchers.MacProxyManager

    public class MacProxyManager

extends java.lang.Object

Class to manage the proxy server on OS X. It uses the 'networksetup' tool to do its magic; it also depends on 'scutil' to read some settings we need to interact with 'networksetup.'

'networksetup' seems to come in a great many varieties depending on different versions of OS X (and different architectures: PPC vs Intel), so we've taken some care to write this class very defensively.

Author:
  Dan Fabulich

Constructor Summary
`MacProxyManager(java.lang.String sessionId, int port)`

Method Summary
`void` | `backupNetworkSettings()` Copy OS X network settings into Java's per-user persistent preference store
`void` | `changeNetworkSettings()` change the network settings to enable use of our proxy
`java.io.File` | `getCustomProxyPACDir()`
`void` | `restoreNetworkSettings()` Restore OS X network settings back the way thay were
`protected java.lang.String` | `runNetworkSetup(java.lang.String... args)` Execute networksetup, returning the output
`protected java.lang.String` | `runScutil(java.lang.String arg)` Execute scutil and quit, returning the output

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MacProxyManager

    public MacProxyManager(java.lang.String sessionId,
                           int port)

Method Detail

### getCustomProxyPACDir

    public java.io.File getCustomProxyPACDir()

### changeNetworkSettings

    public void changeNetworkSettings()
                               throws java.io.IOException

  change the network settings to enable use of our proxy

  Throws:
    `java.io.IOException`

### runScutil

    protected java.lang.String runScutil(java.lang.String arg)

  Execute scutil and quit, returning the output

### runNetworkSetup

    protected java.lang.String runNetworkSetup(java.lang.String... args)

  Execute networksetup, returning the output

### backupNetworkSettings

    public void backupNetworkSettings()
                               throws java.io.IOException

  Copy OS X network settings into Java's per-user persistent preference store

  Throws:
    `java.io.IOException`
  See Also:
    `Preferences`

### restoreNetworkSettings

    public void restoreNetworkSettings()

  Restore OS X network settings back the way thay were

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

Copyright © 2009. All Rights Reserved.