Package net.i2p.app
Interface ClientAppManager
-
- All Known Implementing Classes:
ClientAppManagerImpl
,RouterAppManager
public interface ClientAppManager
Notify the router of events, and provide methods for client apps to find each other.- Since:
- 0.9.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addBubble(String svc, String text)
Increment the count and set the textint
getBubbleCount(String svc)
Bubble countString
getBubbleText(String svc)
Bubble message, translated, not HTML escapedClientApp
getRegisteredApp(String name)
Get a registered app.void
notify(ClientApp app, ClientAppState state, String message, Exception e)
Must be called on all state transitions except from UNINITIALIZED to INITIALIZED.boolean
register(ClientApp app)
Register with the manager under the given name, so that other clients may find it.void
setBubble(String svc, int count, String text)
Update notifications for servicevoid
unregister(ClientApp app)
Unregister with the manager.
-
-
-
Method Detail
-
notify
void notify(ClientApp app, ClientAppState state, String message, Exception e)
Must be called on all state transitions except from UNINITIALIZED to INITIALIZED.- Parameters:
app
- non-nullstate
- non-nullmessage
- may be nulle
- may be null
-
register
boolean register(ClientApp app)
Register with the manager under the given name, so that other clients may find it. Only required for apps used by other apps.- Parameters:
app
- non-null- Returns:
- true if successful, false if duplicate name
-
unregister
void unregister(ClientApp app)
Unregister with the manager. Name must be the same as that from register(). Only required for apps used by other apps.- Parameters:
app
- non-null
-
getRegisteredApp
ClientApp getRegisteredApp(String name)
Get a registered app. Only used for apps finding other apps.- Parameters:
name
- non-null- Returns:
- client app or null
-
getBubbleCount
int getBubbleCount(String svc)
Bubble count- Since:
- 0.9.66
-
getBubbleText
String getBubbleText(String svc)
Bubble message, translated, not HTML escaped- Returns:
- null if none
- Since:
- 0.9.66
-
setBubble
void setBubble(String svc, int count, String text)
Update notifications for service- Parameters:
count
- 0 to cleartext
- translated, not HTML escaped, null if none- Since:
- 0.9.66
-
-