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

com.github.dockerjava.core.command.AbstrAuthCfgDockerCmd Maven / Gradle / Ivy

There is a newer version: 3.4.1
Show newest version
package com.github.dockerjava.core.command;

import static com.google.common.base.Preconditions.checkNotNull;

import com.github.dockerjava.api.command.DockerCmd;
import com.github.dockerjava.api.command.DockerCmdSyncExec;
import com.github.dockerjava.api.model.AuthConfig;

public abstract class AbstrAuthCfgDockerCmd, RES_T> extends AbstrDockerCmd {

    public AbstrAuthCfgDockerCmd(DockerCmdSyncExec execution, AuthConfig authConfig) {
        super(execution);
        withOptionalAuthConfig(authConfig);
    }

    public AbstrAuthCfgDockerCmd(DockerCmdSyncExec execution) {
        super(execution);
    }

    private AuthConfig authConfig;

    public AuthConfig getAuthConfig() {
        return authConfig;
    }

    public T withAuthConfig(AuthConfig authConfig) {
        checkNotNull(authConfig, "authConfig was not specified");
        return withOptionalAuthConfig(authConfig);
    }

    @SuppressWarnings("unchecked")
    private T withOptionalAuthConfig(AuthConfig authConfig) {
        this.authConfig = authConfig;
        return (T) this;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy