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

org.testifyproject.github.dockerjava.jaxrs.InfoCmdExec 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.InfoCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.model.Info;
import org.testifyproject.testifyproject.github.dockerjava.core.DockerClientConfig;

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 org.testifyproject.testifyprojectmand) {
        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