All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.testifyproject.github.dockerjava.jaxrs.InspectImageCmdExec Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
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.InspectImageCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.InspectImageResponse;
import org.testifyproject.testifyproject.github.dockerjava.core.DockerClientConfig;

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 org.testifyproject.testifyprojectmand) {
        WebTarget webResource = getBaseResource().path("/images/{id}/json").resolveTemplate("id", org.testifyproject.testifyprojectmand.getImageId());

        LOGGER.trace("GET: {}", webResource);
        return webResource.request().accept(MediaType.APPLICATION_JSON).get(InspectImageResponse.class);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy