![JAR search and dependency download from the Maven repository](/logo.png)
org.voovan.docker.command.Swarm.CmdSwarmInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JDocker Show documentation
Show all versions of JDocker Show documentation
By encapsulating the Docker API enables developers to use Java can quickly developed the control and operation of the Docker application, using streaming operation, simple and clear.
The newest version!
package org.voovan.docker.command.Swarm;
import org.voovan.docker.command.Cmd;
import org.voovan.docker.message.swarm.SwarmInfo;
import org.voovan.docker.network.DockerClientException;
import org.voovan.docker.network.Result;
/**
* 类文字命名
*
* @author helyho
*
* JDocker Framework.
* WebSite: https://github.com/helyho/JDocker
* Licence: Apache v2 License
*/
public class CmdSwarmInfo extends Cmd {
public CmdSwarmInfo() {
}
public static CmdSwarmInfo newInstance(){
return new CmdSwarmInfo();
}
@Override
public SwarmInfo send() throws Exception {
Result result = getDockerHttpClient().run("GET","/swarm",getParameters());
if(result!=null && result.getStatus()>=300){
throw new DockerClientException(result.getMessage());
}else{
return SwarmInfo.load(result.getMessage());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy