Package org.axonframework.update
Class UpdateChecker
java.lang.Object
org.axonframework.update.UpdateChecker
- All Implemented Interfaces:
Runnable
The UpdateChecker reports Anonymous usage data to AxonIQ periodically. In return, it receives information about
available upgrades and vulnerabilities in the AxonIQ libraries used. These upgrades and vulnerabilities are reported
to the configured
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:
- Set the environment variable
AXONIQ_UPDATE_CHECKER_DISABLED=true. - Run the JVM with
-Daxoniq.update-checker.disabled=true. - Create the file
$HOME/.axoniq/update-checker.propertieswith contentdisabled=true
disabled=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.
- Since:
- 5.0.0
- Author:
- Mitchell Herrijgers
-
Constructor Summary
ConstructorsConstructorDescriptionUpdateChecker(UpdateCheckerHttpClient client, UpdateCheckerReporter reporter, UsagePropertyProvider usagePropertyProvider) Creates a new instance ofUpdateCheckTaskwith the givenUpdateCheckerHttpClientandUsagePropertyProvider. -
Method Summary
-
Constructor Details
-
UpdateChecker
public UpdateChecker(@Nonnull UpdateCheckerHttpClient client, @Nonnull UpdateCheckerReporter reporter, @Nonnull UsagePropertyProvider usagePropertyProvider) Creates a new instance ofUpdateCheckTaskwith the givenUpdateCheckerHttpClientandUsagePropertyProvider.- Parameters:
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.
-
-
Method Details
-
start
public void start()Starts the anonymous usage reporting task. If the user has opted out of anonymous usage reporting, or a testsuite is detected, the task will not be started. -
run
public void run() -
stop
public void stop()Allows the task to be stopped, preventing any further update from being checked. Useful for terminating the task gracefully, for example, when the application is shutting down. -
isStarted
public boolean isStarted()Checks if the UpdateChecker has been started.- Returns:
trueif the UpdateChecker has been started,falseotherwise.
-