Class AppDaemonService


  • public final class AppDaemonService
    extends Object
    this class provides methods to manage daemons services
    • Method Detail

      • init

        public static void init()
        Performs initialization of the DaemonFactory. Note that this should return right away so that processing can continue (IE thread off everything)
        Throws:
        LuteceInitException - If an error occurred
      • unregisterDaemon

        public static void unregisterDaemon​(String strDaemonKey)
        Unregister a daemon
        Parameters:
        strDaemonKey - The daemon key
      • startDaemon

        public static void startDaemon​(String strDaemonKey)
        Starts a daemon
        Parameters:
        strDaemonKey - The daemon key
      • stopDaemon

        public static void stopDaemon​(String strDaemonKey)
        Stops a daemon
        Parameters:
        strDaemonKey - The daemon key
      • signalDaemon

        public static boolean signalDaemon​(String strDaemonKey)
        Signal a daemon for execution in the immediate future.

        This can fail is resources are limited, which should be exceptional.

        Parameters:
        strDaemonKey - the daemon key
        Returns:
        true if the daemon was successfully signaled, false otherwise
        Since:
        6.0.0
      • signalDaemon

        public static boolean signalDaemon​(String strDaemonKey,
                                           long nDelay,
                                           TimeUnit unit)
        Signal a daemon for execution in the immediate future.

        This can fail is resources are limited, which should be exceptional.

        Parameters:
        strDaemonKey - the daemon key
        nDelay - the delay before execution
        unit - the unit of nDelay argument
        Returns:
        true if the daemon was successfully signaled, false otherwise
        Since:
        6.0.0
      • modifyDaemonInterval

        public static void modifyDaemonInterval​(String strDaemonKey,
                                                String strDaemonInterval)
        modify daemon interval
        Parameters:
        strDaemonKey - The daemon key
        strDaemonInterval - the daemon interval
      • getDaemonEntries

        public static Collection<DaemonEntry> getDaemonEntries()
        Get the current known DaemonEntries within the DaemonFactory
        Returns:
        the entries list of daemons declaration
      • shutdown

        public static void shutdown()
        Performs the shutdown of the DaemonFactory.
      • getDaemon

        public static Daemon getDaemon​(String strDaemonKey)
        Gets a daemon object from its key name
        Parameters:
        strDaemonKey - The daemon key
        Returns:
        The daemon