public class UpdateChecker extends java.lang.Object implements IUpdateChecker
IUpdateChecker.
This implementation is not optimized. It doesn't optimize for multiple polls on the same profile, nor does it cache any info about a profile from poll to poll.
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG |
static boolean |
TRACE |
ONE_TIME_CHECK, SERVICE_NAME| Constructor and Description |
|---|
UpdateChecker(IProvisioningAgent agent) |
| Modifier and Type | Method and Description |
|---|---|
void |
addUpdateCheck(java.lang.String profileId,
<any> query,
long delay,
long poll,
IUpdateListener listener)
Adds an update listener that will be notified when updates are available for all
installable units that satisfy the given query.
|
void |
removeUpdateCheck(IUpdateListener listener)
Removes an update listener from the set of listeners registered with this update
checker.
|
public void addUpdateCheck(java.lang.String profileId,
<any> query,
long delay,
long poll,
IUpdateListener listener)
IUpdateCheckerIUpdateChecker.removeUpdateCheck(IUpdateListener)
method. Adding a listener that is identical to a listener that is already registered
has no effect.
Once the listener is registered, it will continue to receive notification of updates
based on the specified polling frequency. However, if a delay value of IUpdateChecker.ONE_TIME_CHECK
is used, only a single update check will occur for that listener. If this delay value
is used, the specified polling frequency is ignored.
addUpdateCheck in interface IUpdateCheckerprofileId - The profile id to check for updatesquery - An installable unit query that matches the units to check for updatesdelay - The delay in milliseconds before the first query should occur, or IUpdateChecker.ONE_TIME_CHECK
to indicate that a single update check should occur immediatelypoll - The polling frequency, in milliseconds, between checks for updateslistener - The listener to be notified of updatesIUpdateChecker.removeUpdateCheck(IUpdateListener)public void removeUpdateCheck(IUpdateListener listener)
IUpdateCheckerremoveUpdateCheck in interface IUpdateCheckerlistener - The listener to remove#addUpdateCheck(String, IQuery, long, long, IUpdateListener)