edu.stanford.ejalbert.launching
Interface IBrowserLaunching

All Known Implementing Classes:
MacOs2_1BrowserLaunching, MacOs3_0BrowserLaunching, MacOs3_1BrowserLaunching, MacOsBrowserLaunching, UnixNetscapeBrowserLaunching, WindowsBrowserLaunching

public interface IBrowserLaunching

Author:
Markus Gebhard

Field Summary
static String BROWSER_DEFAULT
          Identifier for the system's default browser.
static String PROTOCOL_FILE
           
static String PROTOCOL_HTTP
           
static String PROTOCOL_MAILTO
           
 
Method Summary
 List getBrowserList()
          Returns a list of browsers to be used for browser targetting.
 void initialize()
          Performs any initialization needed for the particular O/S.
 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.
 

Field Detail

PROTOCOL_HTTP

    public static final String PROTOCOL_HTTP
See Also:
Constant Field Values

PROTOCOL_FILE

    public static final String PROTOCOL_FILE
See Also:
Constant Field Values

PROTOCOL_MAILTO

    public static final String PROTOCOL_MAILTO
See Also:
Constant Field Values

BROWSER_DEFAULT

    public static final String BROWSER_DEFAULT
Identifier for the system's default browser.

See Also:
Constant Field Values
Method Detail

initialize

    public void initialize()
    throws BrowserLaunchingInitializingException
Performs any initialization needed for the particular O/S.

Throws:
BrowserLaunchingInitializingException

openUrl

    public void openUrl(String urlString)
    throws UnsupportedOperatingSystemException,
    BrowserLaunchingExecutionException,
    BrowserLaunchingInitializingException
Opens the passed url in the system's default browser.

Parameters:
urlString - String
Throws:
UnsupportedOperatingSystemException
BrowserLaunchingExecutionException
BrowserLaunchingInitializingException

openUrl

    public void openUrl(String browser,
    String urlString)
    throws UnsupportedOperatingSystemException,
    BrowserLaunchingExecutionException,
    BrowserLaunchingInitializingException
Allows user to target a specific browser. The names of potential browsers can be accessed via the getBrowserList method.

If the call to the requested browser fails, the code will fail over to the default browser.

Parameters:
browser - String
urlString - String
Throws:
UnsupportedOperatingSystemException
BrowserLaunchingExecutionException
BrowserLaunchingInitializingException

getBrowserList

    public List getBrowserList()
Returns a list of browsers to be used for browser targetting. This list will always contain at least one item: BROWSER_DEFAULT.

Returns:
List