public class ExternalMain extends Object implements ClientApp, NotificationService
| Constructor and Description |
|---|
ExternalMain()Create a new ExternalMain using the global context. |
ExternalMain(I2PAppContext ctx,
ClientAppManager mgr,
String[] args)Create a new ExternalMain with the specified context and manager. |
| Modifier and Type | Method and Description |
|---|---|
boolean | cancel(int id)Cancel a notification if possible. |
String | getDisplayName()The display name of the ClientApp, used in user interfaces. |
String | getName()The generic name of the ClientApp, used for registration,
e.g. |
ClientAppState | getState()The current state of the ClientApp. |
static void | main(String[] args)Main entry point for the external desktop GUI application. |
int | notify(String source,
String category,
int priority,
String title,
String message,
String path)Send a notification to the user. |
void | shutdown(String[] args)Do not take a long time. |
void | startup()Do not take a long time. |
boolean | update(int id,
String title,
String message,
String path)Update the text of a notification if possible. |
public ExternalMain()
public ExternalMain(I2PAppContext ctx, ClientAppManager mgr, String[] args)
ctx - the I2P application contextmgr - the client application managerargs - command line arguments (unused)public boolean cancel(int id)
cancel in interface NotificationServiceid - as received from notify()public String getDisplayName()
ClientAppgetDisplayName in interface ClientApppublic String getName()
ClientApppublic ClientAppState getState()
ClientApppublic static void main(String[] args)
args - command line arguments (unused)public int notify(String source, String category, int priority, String title, String message, String path)
notify in interface NotificationServicesource - unsupportedcategory - unsupportedpriority - unsupportedtitle - for the popup, translatedmessage - translatedpath - unsupportedpublic void shutdown(String[] args)
ClientApppublic void startup()
ClientApppublic boolean update(int id,
String title,
String message,
String path)update in interface NotificationServiceid - as received from notify()title - for the popup, translatedmessage - translatedpath - in console starting with /, must be URL-escaped, or null