public class UfgConnector extends RestClient
RestClient.HttpMethodCall, RestClient.HttpRequestBuilder| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CLIENT_TIMEOUT |
static String |
EMULATED_DEVICES_PATH |
static String |
IOS_DEVICES_PATH |
static int |
MAX_CONNECTION_RETRIES |
protected AtomicReference<RenderingInfo> |
renderingInfo |
agentId, jsonMapper, logger, restClient, serverUrl| Constructor and Description |
|---|
UfgConnector() |
UfgConnector(com.applitools.eyes.Logger logger) |
UfgConnector(com.applitools.eyes.Logger logger,
URI serverUrl) |
UfgConnector(com.applitools.eyes.Logger logger,
URI serverUrl,
int timeout) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkResourceStatus(com.applitools.eyes.TaskListener<Boolean[]> listener,
Set<String> testIds,
String renderId,
HashObject... hashes) |
Future<?> |
downloadResource(URI url,
String userAgent,
String refererUrl,
Set<Cookie> cookies,
com.applitools.eyes.TaskListener<RGridResource> listener) |
Future<?> |
downloadResource(URI url,
String userAgent,
String refererUrl,
Set<Cookie> cookies,
com.applitools.eyes.TaskListener<RGridResource> listener,
int attemptNumber,
boolean shouldSendReferer) |
String |
getApiKey() |
Map<String,DeviceSize> |
getDevicesSizes(String path) |
<T> T |
getFromServer(RestClient.HttpRequestBuilder builder,
com.fasterxml.jackson.core.type.TypeReference<T> typeReference)
Sends a synchronous HTTP GET Request to the server and returns the typed response
|
<T> T |
getFromUrl(String url,
com.fasterxml.jackson.core.type.TypeReference<T> typeReference) |
void |
getJobInfo(com.applitools.eyes.TaskListener<JobInfo[]> listener,
RenderRequest[] browserInfos) |
RenderingInfo |
getRenderInfo() |
Map<String,String> |
getUserAgents() |
void |
render(com.applitools.eyes.TaskListener<List<RunningRender>> listener,
List<RenderRequest> renderRequests) |
Future<?> |
renderPutResource(Set<String> testIds,
String renderID,
RGridResource resource,
com.applitools.eyes.TaskListener<Void> listener) |
Future<?> |
renderPutResource(Set<String> testIds,
String renderId,
RGridResource resource,
com.applitools.eyes.TaskListener<Void> listener,
int attemptNumber) |
void |
renderStatusById(com.applitools.eyes.TaskListener<List<RenderStatusResults>> listener,
List<String> testIds,
List<String> renderIds) |
void |
sendAsyncRequest(com.applitools.connectivity.api.AsyncRequestCallback callback,
String url,
String method,
String... accept) |
void |
setApiKey(String apiKey)
Sets the API key of your applitools Eyes account.
|
void |
setRenderingInfo(RenderingInfo renderInfo) |
boolean |
wasApiKeySet() |
downloadFile, getAgentId, getLogger, getProxy, getReadResponseError, getServerUrlBase, getTimeout, initClient, makeEyesRequest, parseResponseWithJsonData, sendAsyncRequest, sendAsyncRequest, sendAsyncRequest, sendHttpRequest, sendHttpRequest, sendHttpRequest, sendLongRequest, setAgentId, setLogger, setProxy, setServerUrlBase, setTimeoutpublic static final int DEFAULT_CLIENT_TIMEOUT
public static final int MAX_CONNECTION_RETRIES
public static final String IOS_DEVICES_PATH
public static final String EMULATED_DEVICES_PATH
protected final AtomicReference<RenderingInfo> renderingInfo
public UfgConnector(com.applitools.eyes.Logger logger,
URI serverUrl,
int timeout)
public UfgConnector(com.applitools.eyes.Logger logger,
URI serverUrl)
public UfgConnector(com.applitools.eyes.Logger logger)
public UfgConnector()
public void setApiKey(String apiKey)
apiKey - The api key to set.public String getApiKey()
null if no key is set.public boolean wasApiKeySet()
public void sendAsyncRequest(com.applitools.connectivity.api.AsyncRequestCallback callback, String url, String method, String... accept)
sendAsyncRequest in class RestClientpublic void setRenderingInfo(RenderingInfo renderInfo)
public <T> T getFromServer(RestClient.HttpRequestBuilder builder, com.fasterxml.jackson.core.type.TypeReference<T> typeReference)
T - The type of the returned valuebuilder - Builder for creating the requesttypeReference - The type of the returned valuepublic RenderingInfo getRenderInfo()
public Map<String,DeviceSize> getDevicesSizes(String path)
public <T> T getFromUrl(String url, com.fasterxml.jackson.core.type.TypeReference<T> typeReference)
public Future<?> downloadResource(URI url, String userAgent, String refererUrl, Set<Cookie> cookies, com.applitools.eyes.TaskListener<RGridResource> listener)
public Future<?> downloadResource(URI url, String userAgent, String refererUrl, Set<Cookie> cookies, com.applitools.eyes.TaskListener<RGridResource> listener, int attemptNumber, boolean shouldSendReferer)
public Future<?> renderPutResource(Set<String> testIds, String renderID, RGridResource resource, com.applitools.eyes.TaskListener<Void> listener)
public Future<?> renderPutResource(Set<String> testIds, String renderId, RGridResource resource, com.applitools.eyes.TaskListener<Void> listener, int attemptNumber)
public void render(com.applitools.eyes.TaskListener<List<RunningRender>> listener, List<RenderRequest> renderRequests)
public void renderStatusById(com.applitools.eyes.TaskListener<List<RenderStatusResults>> listener, List<String> testIds, List<String> renderIds)
public void checkResourceStatus(com.applitools.eyes.TaskListener<Boolean[]> listener, Set<String> testIds, String renderId, HashObject... hashes)
public void getJobInfo(com.applitools.eyes.TaskListener<JobInfo[]> listener, RenderRequest[] browserInfos)
Copyright © 2021. All rights reserved.