Class UpdateAgent
- java.lang.Object
- 
- jadex.platform.service.autoupdate.UpdateAgent
 
- 
- All Implemented Interfaces:
- IUpdateService
 - Direct Known Subclasses:
- FileUpdateAgent,- MavenUpdateAgent
 
 public class UpdateAgent extends java.lang.Object implements IUpdateService The update agent can be used to restart the platform with a newer version.
- 
- 
Field SummaryFields Modifier and Type Field Description protected EmailAccountaccountThe email account.protected IInternalAccessagentThe agent.protected java.lang.StringerrorfileThe error file (if any).protected java.lang.String[]forbiddenvmargsThe vmargs that should not be used.protected longintervalThe check for update interval.protected java.lang.StringoutputfileThe output file (if any).protected java.lang.String[]receiversThe email receivers.protected booleanseparatevmFlag if new vm should be used.
 - 
Constructor SummaryConstructors Constructor Description UpdateAgent()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbody()The agent body.protected IFuture<UpdateInfo>checkForUpdate()Check if an update is available.java.lang.StringflattenStrings(java.util.Iterator<java.lang.String> it, java.lang.String delim)Flatten strings to one string.protected IFuture<StartOptions>generateStartOptions(UpdateInfo ui)Generate the vm start options.protected static java.lang.StringgetLocalVersionInfo()Create a string for the local Jadex version.protected java.util.Map<java.lang.String,java.lang.Object>getUpdateArguments()Get the arguments to use for the update agent.protected IFuture<java.lang.String>getVersionInfo(IComponentIdentifier newcid)Get the version info for a new platform.protected IFuture<java.lang.Void>notifyUpdateResult(java.lang.String text)Notify administrators that platform update has been tried.IFuture<IComponentIdentifier>performUpdate(UpdateInfo ui)Perform the update.IFuture<IComponentIdentifier>startPlatformInSameVM()Start a new platform in the same vm.IFuture<IComponentIdentifier>startPlatformInSeparateVM(StartOptions so)Start a new platform in a separate vm.
 
- 
- 
- 
Field Detail- 
intervalprotected long interval The check for update interval.
 - 
separatevmprotected boolean separatevm Flag if new vm should be used.
 - 
agentprotected IInternalAccess agent The agent.
 - 
forbiddenvmargsprotected java.lang.String[] forbiddenvmargs The vmargs that should not be used.
 - 
accountprotected EmailAccount account The email account.
 - 
receiversprotected java.lang.String[] receivers The email receivers.
 - 
outputfileprotected java.lang.String outputfile The output file (if any).
 - 
errorfileprotected java.lang.String errorfile The error file (if any).
 
- 
 - 
Method Detail- 
bodypublic void body() The agent body.
 - 
getVersionInfoprotected IFuture<java.lang.String> getVersionInfo(IComponentIdentifier newcid) Get the version info for a new platform.
 - 
getLocalVersionInfoprotected static java.lang.String getLocalVersionInfo() Create a string for the local Jadex version.
 - 
notifyUpdateResultprotected IFuture<java.lang.Void> notifyUpdateResult(java.lang.String text) Notify administrators that platform update has been tried.
 - 
performUpdatepublic IFuture<IComponentIdentifier> performUpdate(UpdateInfo ui) Perform the update.- Specified by:
- performUpdatein interface- IUpdateService
- Parameters:
- ui- The update info.
 
 - 
startPlatformInSameVMpublic IFuture<IComponentIdentifier> startPlatformInSameVM() Start a new platform in the same vm.
 - 
startPlatformInSeparateVMpublic IFuture<IComponentIdentifier> startPlatformInSeparateVM(StartOptions so) Start a new platform in a separate vm.
 - 
generateStartOptionsprotected IFuture<StartOptions> generateStartOptions(UpdateInfo ui) Generate the vm start options. - main class: jadex.base.Starter - vmargs: old vmargs (without debug option) - program args: old program args (with updated argument for update agent to allow handshake)
 - 
flattenStringspublic java.lang.String flattenStrings(java.util.Iterator<java.lang.String> it, java.lang.String delim)Flatten strings to one string.- Parameters:
- it- The iterator of strings.
- delim- The delimiter used to connect the entries.
 
 - 
checkForUpdateprotected IFuture<UpdateInfo> checkForUpdate() Check if an update is available.
 - 
getUpdateArgumentsprotected java.util.Map<java.lang.String,java.lang.Object> getUpdateArguments() Get the arguments to use for the update agent.
 
- 
 
-