Class StatisticsClient
- java.lang.Object
-
- com.epam.reportportal.service.statistics.StatisticsClient
-
- All Implemented Interfaces:
Statistics,java.io.Closeable,java.lang.AutoCloseable
public class StatisticsClient extends java.lang.Object implements Statistics
Statistics backend service asynchronous client. Require resource identifier by provided `trackingId` for sending statistics event.
-
-
Constructor Summary
Constructors Constructor Description StatisticsClient(java.lang.String measurementId, java.lang.String apiSecret, ListenerParameters parameters)Create an instance of the client, construct own HTTP client by given parametersStatisticsClient(java.lang.String measurementId, java.lang.String apiSecret, StatisticsApiClient statisticsApiClient)Create an instance of the client with given HTTP client
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()io.reactivex.Maybe<retrofit2.Response<okhttp3.ResponseBody>>send(StatisticsItem item)Convert and sendStatisticsItemto backend statistics service.
-
-
-
Constructor Detail
-
StatisticsClient
public StatisticsClient(java.lang.String measurementId, java.lang.String apiSecret, ListenerParameters parameters)Create an instance of the client, construct own HTTP client by given parameters- Parameters:
measurementId- ID of the statistics resourceapiSecret- API Secret Keyparameters-ListenerParametersReportPortal parameters
-
StatisticsClient
public StatisticsClient(java.lang.String measurementId, java.lang.String apiSecret, StatisticsApiClient statisticsApiClient)Create an instance of the client with given HTTP client- Parameters:
measurementId- ID of the statistics resourceapiSecret- API Secret KeystatisticsApiClient-StatisticsApiClientinstance
-
-
Method Detail
-
send
public io.reactivex.Maybe<retrofit2.Response<okhttp3.ResponseBody>> send(StatisticsItem item)
Convert and sendStatisticsItemto backend statistics service. Quietly consumes exceptions to not affect reporting flow- Specified by:
sendin interfaceStatistics- Parameters:
item-StatisticsItem- Returns:
- true - if successfully send, otherwise - false wrapped in the
Maybe
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-