Package org.axonframework.updates.api
Class UpdateCheckResponse
java.lang.Object
org.axonframework.updates.api.UpdateCheckResponse
Represents the response from the UpdateChecker API, containing information about version upgrades and vulnerabilities
found in the artifacts used by the application.
- Since:
- 4.12.0
- Author:
- Mitchell Herrijgers
-
Constructor Summary
ConstructorsConstructorDescriptionUpdateCheckResponse(int checkInterval, List<ArtifactAvailableUpgrade> upgrades, List<DetectedVulnerability> vulnerabilities) Constructs anUpdateCheckResponsewith the givencheckInterval,upgrades, andvulnerabilities. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the check interval of this update check response.booleanstatic UpdateCheckResponsefromRequest(String body) Parses the response body from the anonymous usage reporter into aUsageResponseobject.inthashCode()toString()upgrades()Returns the collection ofupgradesof this update check response.Returns the collection ofvulnerabilitiesof this update check response.
-
Constructor Details
-
UpdateCheckResponse
public UpdateCheckResponse(int checkInterval, List<ArtifactAvailableUpgrade> upgrades, List<DetectedVulnerability> vulnerabilities) Constructs anUpdateCheckResponsewith the givencheckInterval,upgrades, andvulnerabilities.- Parameters:
checkInterval- The interval in seconds at which the usage data should be checked.upgrades- A list of found version upgrades, each containing details about the artifact and its latest version.vulnerabilities- A list of found vulnerabilities, each containing details about the artifact, its severity, fix version, and a URL for more information.
-
-
Method Details
-
checkInterval
public int checkInterval()Returns the check interval of this update check response.- Returns:
- The check interval of this update check response.
-
upgrades
Returns the collection ofupgradesof this update check response.- Returns:
- The collection of
upgradesof this update check response.
-
vulnerabilities
Returns the collection ofvulnerabilitiesof this update check response.- Returns:
- The collection of
vulnerabilitiesof this update check response.
-
fromRequest
Parses the response body from the anonymous usage reporter into aUsageResponseobject. The body is expected to be in a specific format where each line contains a key-value pair. The expected keys are:- cd - Check interval in seconds
- vul - Vulnerability information in the format: groupId:artifactId:fixVersion:severity:moreInformationUrl
- upd - Update information in the format: groupId:artifactId:latestVersion
An example of the expected format:
cd=86400 vul=org.axonframework:axon-serialization:1.0.0:HIGH:"https://example.com/vulnerability" upd=org.axonframework:axon-messaging:5.0.1
- Parameters:
body- The response body as a string.- Returns:
- A
UsageResponseobject containing the parsed data.
-
equals
-
hashCode
public int hashCode() -
toString
-