com.fitbur.github.dockerjava.jaxrs.InspectImageCmdExec Maven / Gradle / Ivy
package com.fitbur.github.dockerjava.jaxrs;
import com.fitbur.github.dockerjava.api.com.fitburmand.InspectImageCmd;
import com.fitbur.github.dockerjava.api.com.fitburmand.InspectImageResponse;
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 InspectImageCmdExec extends AbstrSyncDockerCmdExec implements
InspectImageCmd.Exec {
private static final Logger LOGGER = LoggerFactory.getLogger(InspectImageCmdExec.class);
public InspectImageCmdExec(WebTarget baseResource, DockerClientConfig dockerClientConfig) {
super(baseResource, dockerClientConfig);
}
@Override
protected InspectImageResponse execute(InspectImageCmd com.fitburmand) {
WebTarget webResource = getBaseResource().path("/images/{id}/json").resolveTemplate("id", com.fitburmand.getImageId());
LOGGER.trace("GET: {}", webResource);
return webResource.request().accept(MediaType.APPLICATION_JSON).get(InspectImageResponse.class);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy