com.fitbur.github.dockerjava.jaxrs.InfoCmdExec Maven / Gradle / Ivy
package com.fitbur.github.dockerjava.jaxrs;
import com.fitbur.github.dockerjava.api.com.fitburmand.InfoCmd;
import com.fitbur.github.dockerjava.api.model.Info;
import com.fitbur.github.dockerjava.core.DockerClientConfig;
import com.fitbur.slf4j.Logger;
import com.fitbur.slf4j.LoggerFactory;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.MediaType;
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 com.fitburmand) {
WebTarget webResource = getBaseResource().path("/info");
LOGGER.trace("GET: {}", webResource);
return webResource.request().accept(MediaType.APPLICATION_JSON).get(Info.class);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy