Package net.i2p.router.startup
Class RouterAppManager
java.lang.Object
net.i2p.app.ClientAppManagerImpl
net.i2p.router.startup.RouterAppManager
- All Implemented Interfaces:
ClientAppManager
Notify the router of events, and provide methods for
client apps to find each other.
- Since:
- 0.9.4
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class net.i2p.app.ClientAppManagerImpl
_registered -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAndStart(ClientApp app, String[] args) voidIncrement the count and set the textintgetBubbleCount(String svc) Bubble countgetBubbleText(String svc) Bubble message, translated, not HTML escapedgetClientApp(String className, String[] args) Get the first known ClientApp with this class name and exact arguments.voidnotify(ClientApp app, ClientAppState state, String message, Exception e) Must be called on all state transitions except from UNINITIALIZED to INITIALIZED.booleanRegister with the manager under the given name, so that other clients may find it.voidrenderStatusHTML(Writer out) debugvoidUpdate notifications for servicevoidshutdown()voidunregister(ClientApp app) Unregister with the manager.Methods inherited from class net.i2p.app.ClientAppManagerImpl
getRegisteredApp
-
Constructor Details
-
RouterAppManager
-
-
Method Details
-
addAndStart
- Parameters:
args- the args that were used to instantiate the app, non-null, may be zero-length- Returns:
- success
- Throws:
IllegalArgumentException- if already added
-
getClientApp
Get the first known ClientApp with this class name and exact arguments. Caller may then retrieve or control the state of the returned client. A client will generally be found only if it is running or transitioning; after it is stopped it will not be tracked by the manager.- Parameters:
args- non-null, may be zero-length- Returns:
- client app or null
- Since:
- 0.9.6
-
notify
Must be called on all state transitions except from UNINITIALIZED to INITIALIZED.- Specified by:
notifyin interfaceClientAppManager- Overrides:
notifyin classClientAppManagerImpl- Parameters:
app- non-nullstate- non-nullmessage- may be nulle- may be null
-
register
Register with the manager under the given name, so that other clients may find it. Only required for apps used by other apps.- Specified by:
registerin interfaceClientAppManager- Overrides:
registerin classClientAppManagerImpl- Parameters:
app- non-null- Returns:
- true if successful, false if duplicate name
-
unregister
Unregister with the manager. Name must be the same as that from register(). Only required for apps used by other apps.- Specified by:
unregisterin interfaceClientAppManager- Overrides:
unregisterin classClientAppManagerImpl- Parameters:
app- non-null- Since:
- 0.9.41 overridden for logging only
-
getBubbleCount
Bubble count- Specified by:
getBubbleCountin interfaceClientAppManager- Overrides:
getBubbleCountin classClientAppManagerImpl- Returns:
- 0 always, see RouterAppManager override
- Since:
- 0.9.66
-
getBubbleText
Bubble message, translated, not HTML escaped- Specified by:
getBubbleTextin interfaceClientAppManager- Overrides:
getBubbleTextin classClientAppManagerImpl- Returns:
- null if none
- Since:
- 0.9.66
-
setBubble
Update notifications for service- Specified by:
setBubblein interfaceClientAppManager- Overrides:
setBubblein classClientAppManagerImpl- Parameters:
count- 0 to cleartext- translated, not HTML escaped, null if none- Since:
- 0.9.66
-
addBubble
Increment the count and set the text- Specified by:
addBubblein interfaceClientAppManager- Overrides:
addBubblein classClientAppManagerImpl- Parameters:
text- translated, not HTML escaped, null if none- Since:
- 0.9.66
-
shutdown
public void shutdown()- Since:
- 0.9.6
-
renderStatusHTML
debug- Throws:
IOException- Since:
- 0.9.6
-