Package org.axonframework.update
Class UpdateCheckerHttpClient
java.lang.Object
org.axonframework.update.UpdateCheckerHttpClient
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 Summary
ConstructorsConstructorDescriptionUpdateCheckerHttpClient(UsagePropertyProvider userProperties) Creates a newUpdateCheckerHttpClientwith the givenUsagePropertyProvider. -
Method Summary
Modifier and TypeMethodDescriptionsendRequest(UpdateCheckRequest updateCheckRequest, boolean firstRequest) Sends a usage request to the AxonIQ servers.
-
Constructor Details
-
UpdateCheckerHttpClient
Creates a newUpdateCheckerHttpClientwith the givenUsagePropertyProvider. The client will use the properties to determine the URL to send the usage data to.- Parameters:
userProperties- TheUsagePropertyProviderto 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. IffirstRequestis true, it will send a POST request, otherwise it will send a PUT request.- Parameters:
updateCheckRequest- TheUpdateCheckRequestto send.firstRequest- Whether this is the first request or not.- Returns:
- An
Optionalcontaining theUpdateCheckResponseif the request was successful, or empty if it failed.
-