public class Upgrade
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Upgrade.Callback
Callback interface for upgrade events.
|
| Constructor and Description |
|---|
Upgrade(java.lang.String baseName,
java.lang.String downloadUrl,
java.lang.Class<?> appCls)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConfigFile(java.lang.String configFile)
Add the name of a configuration file that should be copied from
the current jarfile to the upgraded jarfile.
|
void |
upgradeJarFile(Upgrade.Callback callback)
Get a jarfile that is the latest version of the application,
copying over all required configuration files to the upgraded jar file.
|
public Upgrade(java.lang.String baseName,
java.lang.String downloadUrl,
java.lang.Class<?> appCls)
baseName - the app jarfile's expected base namedownloadUrl - the download URLappCls - the main class of the application (which must be
loaded from the jarfile that is being upgraded)public void addConfigFile(java.lang.String configFile)
configFile - name of configuration file to copy from current jar file
to upgraded jar filepublic void upgradeJarFile(Upgrade.Callback callback)
callback - callback for status updates, error or success indication, etc.java.io.IOException - if the download or configuration fails