|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.apps.systray.UrlLauncher
public class UrlLauncher
A quick and simple multi-platform URL launcher. It attempts to launch the default browser for the host platform first, then popular third-party browsers if that was not successful.
Handles Galeon, Internet Explorer, Konqueror, Links, Lynx, Mozilla, Mozilla Firefox, Netscape, Opera, and Safari.
Constructor Summary | |
---|---|
UrlLauncher()
Constructor from SysTray |
|
UrlLauncher(I2PAppContext context,
ClientAppManager mgr,
String[] args)
ClientApp constructor used from clients.config |
Method Summary | |
---|---|
String |
getDisplayName()
ClientApp interface |
String |
getName()
ClientApp interface |
ClientAppState |
getState()
ClientApp interface |
static void |
main(String[] args)
Obsolete, now uses ClientApp interface |
boolean |
openUrl(String url)
Discovers the operating system the installer is running under and tries to launch the given URL using the default browser for that platform; if unsuccessful, an attempt is made to launch the URL using the most common browsers. |
boolean |
openUrl(String url,
String browser)
Opens the given URL with the given browser. |
void |
shutdown(String[] args)
ClientApp interface |
void |
startup()
ClientApp interface |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UrlLauncher(I2PAppContext context, ClientAppManager mgr, String[] args)
public UrlLauncher()
Method Detail |
---|
public boolean openUrl(String url) throws Exception
url
- The URL to open.
true
if the operation was successful, otherwise
false
.
Exception
public boolean openUrl(String url, String browser) throws Exception
url
- The URL to open.browser
- The browser to use.
true
if the operation was successful,
otherwise false
.
Exception
public void startup()
startup
in interface ClientApp
public ClientAppState getState()
getState
in interface ClientApp
public String getName()
getName
in interface ClientApp
public String getDisplayName()
getDisplayName
in interface ClientApp
public void shutdown(String[] args)
shutdown
in interface ClientApp
args
- generally null but could be stopArgs from clients.configpublic static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |