Class Main

    • Method Detail

      • main

        public static void main​(String[] args)
      • notify

        public int notify​(String source,
                          String category,
                          int priority,
                          String title,
                          String message,
                          String path)
        Send a notification to the user.
        Specified by:
        notify in interface NotificationService
        Parameters:
        source - unsupported
        category - unsupported
        priority - unsupported
        title - for the popup, translated
        message - translated
        path - unsupported
        Returns:
        0, or -1 on failure
      • cancel

        public boolean cancel​(int id)
        Cancel a notification if possible. Unsupported.
        Specified by:
        cancel in interface NotificationService
        Parameters:
        id - as received from notify()
        Returns:
        false always
      • update

        public boolean update​(int id,
                              String title,
                              String message,
                              String path)
        Update the text of a notification if possible. Unsupported.
        Specified by:
        update in interface NotificationService
        Parameters:
        id - as received from notify()
        title - for the popup, translated
        message - translated
        path - in console starting with /, must be URL-escaped, or null
        Returns:
        false always
      • addMenu

        public MenuHandle addMenu​(String message,
                                  MenuCallback callback)
        Menu will start out shown and enabled, in the root menu
        Specified by:
        addMenu in interface MenuService
        Parameters:
        message - for the menu, translated
        callback - fired on click
        Returns:
        null on error
        Since:
        0.9.59
      • addMenu

        public MenuHandle addMenu​(String message,
                                  MenuCallback callback,
                                  MenuHandle parent)
        Menu will start out enabled, as a submenu
        Specified by:
        addMenu in interface MenuService
        Parameters:
        message - for the menu, translated
        callback - fired on click
        parent - the parent menu this will be a submenu of, or null for top level
        Returns:
        null on error
        Since:
        0.9.59
      • startup

        public void startup()
        Description copied from interface: ClientApp
        Do not take a long time. Do not block. Start threads here if necessary. Client must call ClientAppManager.notify() at least once within this method to change the state from INITIALIZED to something else. Will not be called multiple times on the same object.
        Specified by:
        startup in interface ClientApp
        Since:
        0.9.26
      • shutdown

        public void shutdown​(String[] args)
        Description copied from interface: ClientApp
        Do not take a long time. Do not block. Use a thread if necessary. If previously running, client must call ClientAppManager.notify() at least once within this method to change the state to STOPPING or STOPPED. May be called multiple times on the same object, in any state.
        Specified by:
        shutdown in interface ClientApp
        Parameters:
        args - generally null but could be stopArgs from clients.config
        Since:
        0.9.26
      • getState

        public ClientAppState getState()
        Description copied from interface: ClientApp
        The current state of the ClientApp.
        Specified by:
        getState in interface ClientApp
        Returns:
        non-null
        Since:
        0.9.26
      • getName

        public String getName()
        Description copied from interface: ClientApp
        The generic name of the ClientApp, used for registration, e.g. "console". Do not translate.
        Specified by:
        getName in interface ClientApp
        Returns:
        non-null
        Since:
        0.9.26
      • getDisplayName

        public String getDisplayName()
        Description copied from interface: ClientApp
        The display name of the ClientApp, used in user interfaces. The app must translate.
        Specified by:
        getDisplayName in interface ClientApp
        Returns:
        non-null
        Since:
        0.9.26