Class FileUpdateAgent
- java.lang.Object
- 
- jadex.platform.service.autoupdate.UpdateAgent
- 
- jadex.platform.service.autoupdate.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 SummaryFields Modifier and Type Field Description protected java.lang.StringexcludedirsThe dir exclude pattern.protected java.lang.StringincludefilesThe file include pattern.protected java.lang.Stringlibdirprotected longnewestversionThe newest version date (either current version or newest detected file).protected java.lang.Stringrootdirprotected longsafetydelayThe safety delay.protected java.lang.Stringscandir- 
Fields inherited from class jadex.platform.service.autoupdate.UpdateAgentaccount, agent, errorfile, forbiddenvmargs, interval, outputfile, receivers, separatevm
 
- 
 - 
Constructor SummaryConstructors Constructor Description FileUpdateAgent()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IFuture<UpdateInfo>checkForUpdate()Check if an update is available.protected voidfindDistDirs(java.io.File dir, java.util.TreeSet<java.io.File> results)Recursively scan dirs to find those with a jadex distribution contained.protected IFuture<StartOptions>generateStartOptions(UpdateInfo ui)Generate the start options.protected IFuture<java.lang.Long>getLastVersion()Get the last version (current or from last update check).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.static voidmain(java.lang.String[] args)Main for testing.- 
Methods inherited from class jadex.platform.service.autoupdate.UpdateAgentbody, flattenStrings, getLocalVersionInfo, getVersionInfo, notifyUpdateResult, performUpdate, startPlatformInSameVM, startPlatformInSeparateVM
 
- 
 
- 
- 
- 
Field Detail- 
rootdirprotected java.lang.String rootdir 
 - 
scandirprotected java.lang.String scandir 
 - 
libdirprotected java.lang.String libdir 
 - 
newestversionprotected long newestversion The newest version date (either current version or newest detected file).
 - 
includefilesprotected java.lang.String includefiles The file include pattern.
 - 
excludedirsprotected java.lang.String excludedirs The dir exclude pattern.
 - 
safetydelayprotected long safetydelay The safety delay.
 
- 
 - 
Method Detail- 
generateStartOptionsprotected IFuture<StartOptions> generateStartOptions(UpdateInfo ui) Generate the start options. - classpath: sets it to all jars of the newest found jadex distribution dir.- Overrides:
- generateStartOptionsin class- UpdateAgent
 
 - 
checkForUpdateprotected IFuture<UpdateInfo> checkForUpdate() Check if an update is available.- Overrides:
- checkForUpdatein class- UpdateAgent
 
 - 
findDistDirsprotected 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.
 - 
getLastVersionprotected 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.
 - 
getUpdateArgumentsprotected 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:
- getUpdateArgumentsin class- UpdateAgent
 
 - 
mainpublic static void main(java.lang.String[] args) Main for testing.
 
- 
 
-