java.lang.Objectcom.install4j.api.update.UpdateScheduleRegistry
public class UpdateScheduleRegistry
Administrates an update schedule for your application. This class is intended to be called by
your application. You have to call setUpdateSchedule(UpdateSchedule)
} at some point and
then call checkAndReset()
each time you start up your application (or whenever it is convenient)
to find out if you should check for an update. Note that no updater is started automatically, you have to
start a suitable updater with the ApplicationLauncher
class.
Method Summary | |
---|---|
static boolean |
checkAndReset()
Checks if you should check for an update. |
static void |
checkedForUpdate()
Tells the registry that the current time should be set as the last update check date. |
static java.util.Date |
getLastUpdateCheckDate()
Returns the date you last called checkAndReset() and got a return value of true. |
static UpdateSchedule |
getUpdateSchedule()
Returns the configured update schedule. |
static void |
setUpdateSchedule(UpdateSchedule updateSchedule)
Sets the new update schedule. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean checkAndReset()
ApplicationLauncher
classpublic static void setUpdateSchedule(UpdateSchedule updateSchedule)
updateSchedule
- the update schedulepublic static UpdateSchedule getUpdateSchedule()
public static java.util.Date getLastUpdateCheckDate()
checkAndReset()
and got a return value of true.
public static void checkedForUpdate()
checkAndReset()
sets it automatically if required.