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

de.gesellix.docker.client.container.ManageContainer Maven / Gradle / Ivy

The newest version!
package de.gesellix.docker.client.container;

import de.gesellix.docker.client.EngineResponseContent;
import de.gesellix.docker.engine.AttachConfig;
import de.gesellix.docker.engine.EngineResponse;
import de.gesellix.docker.remote.api.ContainerCreateRequest;
import de.gesellix.docker.remote.api.ContainerCreateResponse;
import de.gesellix.docker.remote.api.ContainerInspectResponse;
import de.gesellix.docker.remote.api.ContainerPruneResponse;
import de.gesellix.docker.remote.api.ContainerTopResponse;
import de.gesellix.docker.remote.api.ContainerUpdateRequest;
import de.gesellix.docker.remote.api.ContainerUpdateResponse;
import de.gesellix.docker.remote.api.ContainerWaitResponse;
import de.gesellix.docker.remote.api.ExecConfig;
import de.gesellix.docker.remote.api.ExecInspectResponse;
import de.gesellix.docker.remote.api.ExecStartConfig;
import de.gesellix.docker.remote.api.FilesystemChange;
import de.gesellix.docker.remote.api.IdResponse;
import de.gesellix.docker.remote.api.client.ContainerApi;
import de.gesellix.docker.remote.api.core.Frame;
import de.gesellix.docker.remote.api.core.StreamCallback;
import okhttp3.WebSocket;
import okhttp3.WebSocketListener;

import java.io.InputStream;
import java.time.Duration;
import java.util.List;
import java.util.Map;
import java.util.function.Predicate;

public interface ManageContainer {

  EngineResponse attach(String container, Map query);

  EngineResponse attach(String container, Map query, AttachConfig callback);

  void attach(String containerId,
              String detachKeys,
              Boolean logs, Boolean stream,
              Boolean stdin, Boolean stdout, Boolean stderr,
              StreamCallback callback, Duration timeout);

  void resizeTTY(String container, Integer height, Integer width);

  WebSocket attachWebsocket(String container, Map query, WebSocketListener listener);

  EngineResponseContent commit(String container, Map query);

  EngineResponseContent commit(String container, Map query, Map config);

  EngineResponseContent> getArchiveStats(String container, String path);

  byte[] extractFile(String container, String filename);

  EngineResponseContent getArchive(String container, String path);

  void putArchive(String container, String path, InputStream archive);

  EngineResponseContent createContainer(ContainerCreateRequest containerCreateRequest);

  EngineResponseContent createContainer(ContainerCreateRequest containerCreateRequest, String name);

  EngineResponseContent createContainer(ContainerCreateRequest containerCreateRequest, String name, String authBase64Encoded);

  EngineResponseContent> diff(String container);

  EngineResponseContent createExec(String container, ExecConfig execConfig);

  void startExec(String execId, ExecStartConfig execStartConfig, AttachConfig attachConfig);

  void startExec(String execId, ExecStartConfig execStartConfig, StreamCallback callback, Duration timeout);

  EngineResponseContent inspectExec(String execId);

  EngineResponseContent exec(String container, List command, StreamCallback callback, Duration timeout);

  EngineResponseContent exec(String container, List command, StreamCallback callback, Duration timeout, Map execConfig);

  void resizeExec(String exec, Integer height, Integer width);

  EngineResponseContent export(String container);

  EngineResponseContent inspectContainer(String container);

  void kill(String container);

  void logs(String container, Map query, StreamCallback callback, Duration timeout);

  void waitForLogEvent(String container, Map query, Predicate matcher, Duration timeout);

  EngineResponseContent>> ps(Map query);

  EngineResponseContent>> ps();

  EngineResponseContent>> ps(Boolean all);

  EngineResponseContent>> ps(Boolean all, Integer limit);

  EngineResponseContent>> ps(Boolean all, Integer limit, Boolean size);

  EngineResponseContent>> ps(Boolean all, Integer limit, Boolean size, String filters);

  void pause(String container);

  EngineResponseContent pruneContainers();

  EngineResponseContent pruneContainers(String filters);

  void rename(String container, String newName);

  void restart(String containerIdOrName);

  void rm(String containerIdOrName);

  void rm(String containerIdOrName, Map query);

  EngineResponseContent run(ContainerCreateRequest containerCreateRequest);

  EngineResponseContent run(ContainerCreateRequest containerCreateRequest, String name);

  EngineResponseContent run(ContainerCreateRequest containerCreateRequest, String name, String authBase64Encoded);

  void startContainer(String container);

  void stats(String container, Boolean stream, StreamCallback callback, Duration timeout);

  void stop(String containerIdOrName);

  void stop(String containerIdOrName, Integer timeoutSeconds);

  void stop(String containerIdOrName, Duration timeout);

  EngineResponseContent top(String containerIdOrName);

  EngineResponseContent top(String containerIdOrName, String psArgs);

  void unpause(String container);

  EngineResponseContent updateContainer(String container, ContainerUpdateRequest containerUpdateRequest);

  EngineResponseContent wait(String containerIdOrName);

  EngineResponseContent wait(String containerIdOrName, ContainerApi.ConditionContainerWait condition);
}