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

com.github.dockerjava.api.command.WaitContainerCmd Maven / Gradle / Ivy

There is a newer version: 3.4.0
Show newest version
package com.github.dockerjava.api.command;

import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;

import com.github.dockerjava.api.async.ResultCallback;
import com.github.dockerjava.api.exception.NotFoundException;
import com.github.dockerjava.api.model.WaitResponse;

/**
 * Wait a container
 *
 * Block until container stops, then returns its exit code
 */
public interface WaitContainerCmd extends AsyncDockerCmd {

    @CheckForNull
    String getContainerId();

    WaitContainerCmd withContainerId(@Nonnull String containerId);

    /**
     * @throws NotFoundException
     *             container not found
     */
    @Override
    > T exec(T resultCallback);

    @Override
    default WaitContainerResultCallback start() {
        return exec(new WaitContainerResultCallback());
    }

    interface Exec extends DockerCmdAsyncExec {
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy