Class UpdateCheckerHttpClient

java.lang.Object
org.axonframework.update.UpdateCheckerHttpClient

@Internal public class UpdateCheckerHttpClient extends Object
Client for checking for update and sending anonymous usage data to the AxonIQ servers. This client uses the UsagePropertyProvider to determine the URL to send the data to.
Since:
5.0.0
Author:
Mitchell Herrijgers
  • Constructor Details

    • UpdateCheckerHttpClient

      public UpdateCheckerHttpClient(@Nonnull UsagePropertyProvider userProperties)
      Creates a new UpdateCheckerHttpClient with the given UsagePropertyProvider. The client will use the properties to determine the URL to send the usage data to.
      Parameters:
      userProperties - The UsagePropertyProvider to use for retrieving the URL and other properties.
  • Method Details

    • sendRequest

      public Optional<UpdateCheckResponse> sendRequest(@Nonnull UpdateCheckRequest updateCheckRequest, boolean firstRequest)
      Sends a usage request to the AxonIQ servers. If firstRequest is true, it will send a POST request, otherwise it will send a PUT request.
      Parameters:
      updateCheckRequest - The UpdateCheckRequest to send.
      firstRequest - Whether this is the first request or not.
      Returns:
      An Optional containing the UpdateCheckResponse if the request was successful, or empty if it failed.