org.testifyproject.github.dockerjava.jaxrs.InfoCmdExec Maven / Gradle / Ivy
package org.testifyproject.testifyproject.github.dockerjava.jaxrs;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.MediaType;
import org.testifyproject.slf4j.Logger;
import org.testifyproject.slf4j.LoggerFactory;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.InfoCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.model.Info;
import org.testifyproject.testifyproject.github.dockerjava.core.DockerClientConfig;
public class InfoCmdExec extends AbstrSyncDockerCmdExec implements InfoCmd.Exec {
private static final Logger LOGGER = LoggerFactory.getLogger(InfoCmdExec.class);
public InfoCmdExec(WebTarget baseResource, DockerClientConfig dockerClientConfig) {
super(baseResource, dockerClientConfig);
}
@Override
protected Info execute(InfoCmd org.testifyproject.testifyprojectmand) {
WebTarget webResource = getBaseResource().path("/info");
LOGGER.trace("GET: {}", webResource);
return webResource.request().accept(MediaType.APPLICATION_JSON).get(Info.class);
}
}