com.github.dockerjava.core.command.AbstrDockerCmd Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docker-java Show documentation
Show all versions of docker-java Show documentation
Java API Client for Docker
package com.github.dockerjava.core.command;
import static com.google.common.base.Preconditions.checkNotNull;
import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.github.dockerjava.api.DockerException;
import com.github.dockerjava.api.command.DockerCmd;
import com.github.dockerjava.api.command.DockerCmdExec;
public abstract class AbstrDockerCmd, RES_T> implements DockerCmd {
private final static Logger LOGGER = LoggerFactory.getLogger(AbstrDockerCmd.class);
protected DockerCmdExec execution;
public AbstrDockerCmd(DockerCmdExec execution) {
checkNotNull(execution, "execution was not specified");
this.execution = execution;
}
@Override
@SuppressWarnings("unchecked")
public RES_T exec() throws DockerException {
LOGGER.debug("Cmd: {}", this);
return execution.exec((CMD_T)this);
}
@Override
public void close() throws IOException {}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy