|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.ejalbert.launching.windows.WindowsBrowserLaunching
edu.stanford.ejalbert.launching.windows.DefaultWindowsBrowserLaunching
Field Summary | |
protected static String |
FIRST_WINDOWS_PARAMETER
The first parameter that needs to be passed into Runtime.exec() to open the default web browser on Windows. |
protected static String |
SECOND_WINDOWS_PARAMETER
The second parameter for Runtime.exec() on Windows. |
protected static String |
THIRD_WINDOWS_PARAMETER
The third parameter for Runtime.exec() on Windows. |
Fields inherited from class edu.stanford.ejalbert.launching.windows.WindowsBrowserLaunching |
logger
|
Fields inherited from interface edu.stanford.ejalbert.launching.IBrowserLaunching |
BROWSER_DEFAULT,
PROTOCOL_FILE,
PROTOCOL_HTTP,
PROTOCOL_MAILTO
|
Constructor Summary | |
protected |
DefaultWindowsBrowserLaunching(AbstractLogger logger)
|
Method Summary | |
protected Map |
getAvailableBrowsers(List browsersToCheck)
Accesses the Windows registry to look for browser exes. |
List |
getBrowserList()
Returns a list of browsers to be used for browser targetting. |
protected Map |
getBrowserMap()
Returns map of browser names and exe names to WindowsBrowser objects. |
protected abstract String[] |
getCommandArgs(String protocol,
String urlString)
Returns the windows arguments for launching a default browser. |
protected abstract String[] |
getCommandArgs(String protocol,
String browserName,
String urlString)
Returns the windows arguments for launching a specified browser. |
void |
openUrl(String urlString)
Opens the passed url in the system's default browser. |
void |
openUrl(String browser,
String urlString)
Allows user to target a specific browser. |
Methods inherited from class edu.stanford.ejalbert.launching.windows.WindowsBrowserLaunching |
getArrayAsString,
getProtocol,
initialize
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final String FIRST_WINDOWS_PARAMETER
protected static final String SECOND_WINDOWS_PARAMETER
protected static final String THIRD_WINDOWS_PARAMETER
Constructor Detail |
protected DefaultWindowsBrowserLaunching(AbstractLogger logger)
Method Detail |
protected abstract String[] getCommandArgs(String protocol, String urlString)
protocol
- StringurlString
- String
protected abstract String[] getCommandArgs(String protocol, String browserName, String urlString)
protocol
- StringbrowserName
- String
urlString
- String
protected Map getAvailableBrowsers(List browsersToCheck)
WindowsBrowser
objects.
browsersToCheck
- List
protected final Map getBrowserMap()
WindowsBrowser
objects.
This is the preferred method for accessing the browser name and exe map.
public void openUrl(String urlString) throws UnsupportedOperatingSystemException, BrowserLaunchingExecutionException, BrowserLaunchingInitializingException
IBrowserLaunching
urlString
- String
UnsupportedOperatingSystemException
BrowserLaunchingExecutionException
BrowserLaunchingInitializingException
public void openUrl(String browser, String urlString) throws UnsupportedOperatingSystemException, BrowserLaunchingExecutionException, BrowserLaunchingInitializingException
IBrowserLaunching
getBrowserList
method.
If the call to the requested browser fails, the code will fail over to the default browser.
browser
- StringurlString
- String
BrowserLaunchingExecutionException
BrowserLaunchingInitializingException
UnsupportedOperatingSystemException
public List getBrowserList()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |