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

com.fitbur.github.dockerjava.jaxrs.InspectContainerCmdExec Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package com.fitbur.github.dockerjava.jaxrs;

import com.fitbur.github.dockerjava.api.com.fitburmand.InspectContainerCmd;
import com.fitbur.github.dockerjava.api.com.fitburmand.InspectContainerResponse;
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 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 com.fitburmand) {
        WebTarget webResource = getBaseResource().path("/containers/{id}/json").resolveTemplate("id",
                com.fitburmand.getContainerId());

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy