|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.ejalbert.BrowserLauncherRunner
public class BrowserLauncherRunner
This is a convenience class to facilitate executing the browser launch in a separate thread. Applications will need to create a thread passing an instance of this class, then call start() on the thread created.
Field Summary | |
---|---|
private BrowserLauncherErrorHandler |
errorHandler
|
private BrowserLauncher |
launcher
|
private java.lang.String |
targetBrowser
|
private java.lang.String |
url
|
Constructor Summary | |
---|---|
BrowserLauncherRunner(BrowserLauncher launcher,
java.lang.String url,
BrowserLauncherErrorHandler errorHandler)
Takes the items necessary for launching a browser and handling any exceptions. |
|
BrowserLauncherRunner(BrowserLauncher launcher,
java.lang.String browserName,
java.lang.String url,
BrowserLauncherErrorHandler errorHandler)
Takes the items necessary for launching a browser and handling any exceptions. |
Method Summary | |
---|---|
void |
run()
When an object implementing interface Runnable is used to
create a thread, starting the thread causes the object's
run method to be called in that separately executing
thread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String targetBrowser
private java.lang.String url
private BrowserLauncherErrorHandler errorHandler
private BrowserLauncher launcher
Constructor Detail |
---|
public BrowserLauncherRunner(BrowserLauncher launcher, java.lang.String url, BrowserLauncherErrorHandler errorHandler)
If the errorHandler is null, an instance of the BrowserLauncherDefaultErrorHandler will be used.
launcher
- BrowserLauncherurl
- StringerrorHandler
- BrowserLauncherErrorHandlerBrowserLauncherDefaultErrorHandler
public BrowserLauncherRunner(BrowserLauncher launcher, java.lang.String browserName, java.lang.String url, BrowserLauncherErrorHandler errorHandler)
If the errorHandler is null, an instance of the BrowserLauncherDefaultErrorHandler will be used.
launcher
- BrowserLauncherbrowserName
- Stringurl
- StringerrorHandler
- BrowserLauncherErrorHandlerBrowserLauncherDefaultErrorHandler
Method Detail |
---|
public void run()
Runnable
is used to
create a thread, starting the thread causes the object's
run
method to be called in that separately executing
thread.
This method will make the call to open the browser and display the url. If an exception occurs, it will be passed to the instance of BrowserLauncherErrorHandler that has been passed into the constructor. If no error handler is available, an instance of the default error handler will be used.
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |