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

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

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

import com.github.dockerjava.api.command.InspectSwarmNodeCmd;
import com.github.dockerjava.api.exception.NotFoundException;
import com.github.dockerjava.api.model.SwarmNode;

import javax.annotation.CheckForNull;

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

/**
 * Inspect the details of a swarmNode.
 */
public class InspectSwarmNodeCmdImpl extends AbstrDockerCmd implements
        InspectSwarmNodeCmd {

    private String swarmNodeId;

    public InspectSwarmNodeCmdImpl(Exec exec, String swarmNodeId) {
        super(exec);
        withSwarmNodeId(swarmNodeId);
    }

    @Override
    @CheckForNull
    public String getSwarmNodeId() {
        return swarmNodeId;
    }

    @Override
    public InspectSwarmNodeCmd withSwarmNodeId(String swarmNodeId) {
        checkNotNull(swarmNodeId, "swarmNodeId was not specified");
        this.swarmNodeId = swarmNodeId;
        return this;
    }

    /**
     * @throws NotFoundException
     *             No such swarmNode
     */
    @Override
    public SwarmNode exec() throws NotFoundException {
        return super.exec();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy