com.applitools.connectivity.api.ConnectivityTargetImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eyes-connectivity-java3-jersey2x Show documentation
Show all versions of eyes-connectivity-java3-jersey2x Show documentation
Applitools Eyes SDK REST API communication implementation depending on Jersey version 2x
package com.applitools.connectivity.api;
import com.applitools.eyes.Logger;
import com.applitools.utils.ArgumentGuard;
import javax.ws.rs.client.WebTarget;
public class ConnectivityTargetImpl extends ConnectivityTarget {
WebTarget target;
ConnectivityTargetImpl(WebTarget target, Logger logger) {
super(logger);
this.target = target;
}
@Override
public ConnectivityTarget path(String path) {
ArgumentGuard.notNull(path, "path");
target = target.path(path);
return this;
}
@Override
public ConnectivityTarget queryParam(String name, String value) {
ArgumentGuard.notNullOrEmpty(name, "name");
ArgumentGuard.notNullOrEmpty(value, "value");
target = target.queryParam(name, value);
return this;
}
@Override
public Request request(String... acceptableResponseTypes) {
return new RequestImpl(target.request(acceptableResponseTypes), logger);
}
@Override
public AsyncRequest asyncRequest(String... acceptableResponseTypes) {
return new AsyncRequestImpl(target.request(acceptableResponseTypes), logger);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy