Package io.quarkus.analytics.rest
Class RestClient
- java.lang.Object
-
- io.quarkus.analytics.rest.RestClient
-
- All Implemented Interfaces:
ConfigClient,SegmentClient
public class RestClient extends Object implements ConfigClient, SegmentClient
Client to post the analytics data to the upstream collection tool. We use plain REST API calls and not any wrapping library.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_TIMEOUT
-
Constructor Summary
Constructors Constructor Description RestClient()RestClient(MessageWriter log)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<AnalyticsRemoteConfig>getConfig()CompletableFuture<HttpResponse<String>>postIdentity(Identity identity)Posts the anonymous identity to the upstream collection tool.CompletableFuture<HttpResponse<String>>postTrack(Track track)Posts the trace to the upstream collection tool.
-
-
-
Field Detail
-
DEFAULT_TIMEOUT
public static final int DEFAULT_TIMEOUT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RestClient
public RestClient(MessageWriter log)
-
RestClient
public RestClient()
-
-
Method Detail
-
postIdentity
public CompletableFuture<HttpResponse<String>> postIdentity(Identity identity)
Description copied from interface:SegmentClientPosts the anonymous identity to the upstream collection tool. Usually this is done once per user's UUID- Specified by:
postIdentityin interfaceSegmentClient
-
postTrack
public CompletableFuture<HttpResponse<String>> postTrack(Track track)
Description copied from interface:SegmentClientPosts the trace to the upstream collection tool. This contains the actual data to be collected.- Specified by:
postTrackin interfaceSegmentClient
-
getConfig
public Optional<AnalyticsRemoteConfig> getConfig()
- Specified by:
getConfigin interfaceConfigClient
-
-