Package net.i2p.app

Class ClientAppManagerImpl

  • All Implemented Interfaces:
    ClientAppManager
    Direct Known Subclasses:
    RouterAppManager

    public class ClientAppManagerImpl
    extends Object
    implements ClientAppManager
    A simple ClientAppManager that supports register/unregister only, so that client apps may find each other in AppContext. See RouterAppManager for the real thing in RouterContext.
    Since:
    0.9.30
    • Constructor Detail

      • ClientAppManagerImpl

        public ClientAppManagerImpl​(I2PAppContext ctx)
    • Method Detail

      • register

        public 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.
        Specified by:
        register in interface ClientAppManager
        Parameters:
        app - non-null
        Returns:
        true if successful, false if duplicate name
      • unregister

        public 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.
        Specified by:
        unregister in interface ClientAppManager
        Parameters:
        app - non-null
      • getRegisteredApp

        public ClientApp getRegisteredApp​(String name)
        Get a registered app. Only used for apps finding other apps. Do not hold a static reference. If you only need to find a port, use the PortMapper instead.
        Specified by:
        getRegisteredApp in interface ClientAppManager
        Parameters:
        name - non-null
        Returns:
        client app or null
      • getBubbleText

        public String getBubbleText​(String svc)
        Description copied from interface: ClientAppManager
        Bubble message, translated, not HTML escaped
        Specified by:
        getBubbleText in interface ClientAppManager
        Returns:
        null always, see RouterAppManager override
        Since:
        0.9.66
      • setBubble

        public void setBubble​(String svc,
                              int count,
                              String text)
        Does nothing, see RouterAppManager override
        Specified by:
        setBubble in interface ClientAppManager
        count - 0 to clear
        text - translated, not HTML escaped, null if none
        Since:
        0.9.66
      • addBubble

        public void addBubble​(String svc,
                              String text)
        Does nothing, see RouterAppManager override
        Specified by:
        addBubble in interface ClientAppManager
        text - translated, not HTML escaped, null if none
        Since:
        0.9.66