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

org.testifyproject.github.dockerjava.jaxrs.InspectContainerCmdExec 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.InspectContainerCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.InspectContainerResponse;
import org.testifyproject.testifyproject.github.dockerjava.core.DockerClientConfig;

public class InspectContainerCmdExec extends AbstrSyncDockerCmdExec
        implements InspectContainerCmd.Exec {

    private static final Logger LOGGER = LoggerFactory.getLogger(InspectContainerCmdExec.class);

    public InspectContainerCmdExec(WebTarget baseResource, DockerClientConfig dockerClientConfig) {
        super(baseResource, dockerClientConfig);
    }

    @Override
    protected InspectContainerResponse execute(InspectContainerCmd org.testifyproject.testifyprojectmand) {
        WebTarget webResource = getBaseResource().path("/containers/{id}/json")
                                                 .resolveTemplate("id", org.testifyproject.testifyprojectmand.getContainerId());

        webResource = booleanQueryParam(webResource, "size", org.testifyproject.testifyprojectmand.getSize());

        LOGGER.org.testifyproject.testifyprojectbug("GET: {}", webResource);
        return webResource.request().accept(MediaType.APPLICATION_JSON).get(InspectContainerResponse.class);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy