edu.stanford.ejalbert.launching.misc
Class StandardUnixBrowser

java.lang.Object
  extended byedu.stanford.ejalbert.launching.misc.StandardUnixBrowser
All Implemented Interfaces:
BrowserDescription, UnixBrowser

class StandardUnixBrowser
extends Object
implements UnixBrowser

Contains information on a unix browser.


Constructor Summary
(package private) StandardUnixBrowser(String configSep, String configStr)
          Splits the config string using the configSep character.
 
Method Summary
 String[] getArgsForForcingNewBrowserWindow(String urlString)
           
 String[] getArgsForOpenBrowser(String urlString)
          Returns the command line arguments for addressing an already open browser.
 String[] getArgsForStartingBrowser(String urlString)
          Returns the command line arguments for starting a new browser instance.
 String getBrowserApplicationName()
          Returns the executable name for the browser.
 String getBrowserDisplayName()
          Returns the display name for the browser.
 boolean isBrowserAvailable(AbstractLogger logger)
          Returns true if the browser is available, ie which command finds it.
 String toString()
          Returns debug information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StandardUnixBrowser

StandardUnixBrowser(String configSep,
                    String configStr)
Splits the config string using the configSep character. The resulting config items are used to set the browser display name, the browser executable name, and the arguments for starting a new browser instance and addressing an already open browser.

Parameters:
configSep - String
configStr - String
Method Detail

toString

public String toString()
Returns debug information.

Returns:
String

getBrowserDisplayName

public String getBrowserDisplayName()
Returns the display name for the browser.

Specified by:
getBrowserDisplayName in interface BrowserDescription
Returns:
String

getBrowserApplicationName

public String getBrowserApplicationName()
Returns the executable name for the browser.

Specified by:
getBrowserApplicationName in interface BrowserDescription
Returns:
String

getArgsForOpenBrowser

public String[] getArgsForOpenBrowser(String urlString)
Returns the command line arguments for addressing an already open browser.

Specified by:
getArgsForOpenBrowser in interface UnixBrowser
Parameters:
urlString - String
Returns:
String[]

getArgsForStartingBrowser

public String[] getArgsForStartingBrowser(String urlString)
Returns the command line arguments for starting a new browser instance.

Specified by:
getArgsForStartingBrowser in interface UnixBrowser
Parameters:
urlString - String
Returns:
String[]

getArgsForForcingNewBrowserWindow

public String[] getArgsForForcingNewBrowserWindow(String urlString)
Specified by:
getArgsForForcingNewBrowserWindow in interface UnixBrowser

isBrowserAvailable

public boolean isBrowserAvailable(AbstractLogger logger)
Returns true if the browser is available, ie which command finds it.

Specified by:
isBrowserAvailable in interface UnixBrowser
Parameters:
logger - AbstractLogger
Returns:
boolean