
com.github.dockerjava.core.command.ExecStartCmdImpl 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.InputStream;
import com.github.dockerjava.api.NotFoundException;
import com.github.dockerjava.api.command.ExecStartCmd;
public class ExecStartCmdImpl extends AbstrDockerCmd implements ExecStartCmd {
private String execId;
private boolean detach, tty;
public ExecStartCmdImpl(ExecStartCmd.Exec exec, String execId) {
super(exec);
withExecId(execId);
}
@Override
public String getExecId() {
return execId;
}
@Override
public ExecStartCmd withExecId(String execId) {
checkNotNull(execId, "execId was not specified");
this.execId = execId;
return this;
}
@Override
public boolean hasDetachEnabled() {
return detach;
}
@Override
public boolean hasTtyEnabled() {
return tty;
}
@Override
public ExecStartCmd withDetach(boolean detach) {
this.detach = detach;
return this;
}
@Override
public ExecStartCmd withTty(boolean tty) {
this.tty = tty;
return this;
}
@Override
public ExecStartCmd withDetach() {
return withDetach(true);
}
@Override
public ExecStartCmd withTty() {
return withTty(true);
}
/**
* @throws com.github.dockerjava.api.NotFoundException No such exec instance
*/
@Override
public InputStream exec() throws NotFoundException {
return super.exec();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy