Record Class UpdateCheckResponse

java.lang.Object
java.lang.Record
org.axonframework.update.api.UpdateCheckResponse
Record Components:
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.

@Internal public record UpdateCheckResponse(int checkInterval, @Nonnull List<ArtifactAvailableUpgrade> upgrades, @Nonnull List<DetectedVulnerability> vulnerabilities) extends Record
Represents the response from the UpdateChecker API, containing information about version upgrades and vulnerabilities found in the artifacts used by the application.
Since:
5.0.0
Author:
Mitchell Herrijgers
  • Constructor Details

  • Method Details

    • fromRequest

      @Nonnull public static UpdateCheckResponse fromRequest(@Nullable String body)
      Parses the response body from the anonymous usage reporter into a UsageResponse object. 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-conversion: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 UsageResponse object containing the parsed data.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • checkInterval

      public int checkInterval()
      Returns the value of the checkInterval record component.
      Returns:
      the value of the checkInterval record component
    • upgrades

      @Nonnull public List<ArtifactAvailableUpgrade> upgrades()
      Returns the value of the upgrades record component.
      Returns:
      the value of the upgrades record component
    • vulnerabilities

      @Nonnull public List<DetectedVulnerability> vulnerabilities()
      Returns the value of the vulnerabilities record component.
      Returns:
      the value of the vulnerabilities record component