Class FileUpdateAgent

  • All Implemented Interfaces:
    IUpdateService

    public class FileUpdateAgent
    extends UpdateAgent
    The file update agent is based on a scan directory in which new versions are detected. If a new version was found the agent will initiate a platform restart.
    • Field Detail

      • rootdir

        protected java.lang.String rootdir
      • scandir

        protected java.lang.String scandir
      • libdir

        protected java.lang.String libdir
      • newestversion

        protected long newestversion
        The newest version date (either current version or newest detected file).
      • includefiles

        protected java.lang.String includefiles
        The file include pattern.
      • excludedirs

        protected java.lang.String excludedirs
        The dir exclude pattern.
      • safetydelay

        protected long safetydelay
        The safety delay.
    • Constructor Detail

      • FileUpdateAgent

        public FileUpdateAgent()
    • Method Detail

      • findDistDirs

        protected void findDistDirs​(java.io.File dir,
                                    java.util.TreeSet<java.io.File> results)
        Recursively scan dirs to find those with a jadex distribution contained. Sorts the found entries according to their date.
      • getLastVersion

        protected IFuture<java.lang.Long> getLastVersion()
        Get the last version (current or from last update check). Uses the timestamp of a jadex jar in the used classpath.
      • getUpdateArguments

        protected java.util.Map<java.lang.String,​java.lang.Object> getUpdateArguments()
        Convert the root dir to absolute to avoid nesting dist dirs in dist dirs.
        Overrides:
        getUpdateArguments in class UpdateAgent
      • main

        public static void main​(java.lang.String[] args)
        Main for testing.