public class UpdateChecker extends Object implements Runnable, Lifecycle
UpdateCheckerReporter.
The task will not run if the user has opted out of anonymous usage reporting. There are three ways to disable the anonymous usage reporting:
AXONIQ_UPDATE_CHECKER_DISABLED=true.-Daxoniq.update-checker.disabled=true.$HOME/.axoniq/update-checker.properties with content disabled=truedisabled=false in a method of higher precedence will ignore the lower precedence disabled.
This class is not intended to be in use during the running of test suites and therefore does not run when it detects one.
Lifecycle.LifecycleHandler, Lifecycle.LifecycleRegistry| Constructor and Description |
|---|
UpdateChecker(UpdateCheckerHttpClient client,
UpdateCheckerReporter reporter,
UsagePropertyProvider usagePropertyProvider)
Creates a new instance of
UpdateCheckTask with the given UpdateCheckerHttpClient and
UsagePropertyProvider. |
UpdateChecker(UpdateCheckerHttpClient client,
UpdateCheckerReporter reporter,
UsagePropertyProvider usagePropertyProvider,
ScheduledExecutorService executor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isStarted()
Checks if the UpdateChecker has been started.
|
void |
registerLifecycleHandlers(Lifecycle.LifecycleRegistry lifecycle)
Registers the activities to be executed in the various phases of an application's lifecycle.
|
void |
run() |
void |
start()
Starts the anonymous usage reporting task.
|
void |
stop()
Allows the task to be stopped, preventing any further updates from being checked.
|
public UpdateChecker(UpdateCheckerHttpClient client, UpdateCheckerReporter reporter, UsagePropertyProvider usagePropertyProvider)
UpdateCheckTask with the given UpdateCheckerHttpClient and
UsagePropertyProvider.client - The HTTP client used to send requests to the telemetry endpoint.reporter - The reporter that will handle the response from the telemetry endpoint.usagePropertyProvider - The property provider used to determine if the update check is disabled.public UpdateChecker(UpdateCheckerHttpClient client, UpdateCheckerReporter reporter, UsagePropertyProvider usagePropertyProvider, ScheduledExecutorService executor)
public void registerLifecycleHandlers(@Nonnull Lifecycle.LifecycleRegistry lifecycle)
LifecycleregisterLifecycleHandlers in interface Lifecyclelifecycle - the lifecycle instance to register the handlers withLifecycle.LifecycleRegistry.onShutdown(int, Runnable),
LifecycleRegistry#onShutdown(int, LifecycleHandler),
Lifecycle.LifecycleRegistry.onStart(int, Runnable),
LifecycleRegistry#onStart(int, LifecycleHandler)public void start()
public void stop()
public boolean isStarted()
true if the UpdateChecker has been started, false otherwise.Copyright © 2010–2026. All rights reserved.