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

org.voovan.docker.message.swarm.SwarmJoin Maven / Gradle / Ivy

Go to download

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.message.swarm;

import org.voovan.tools.json.JSON;
import org.voovan.tools.log.Logger;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author helyho
 * 

* DockerFly Framework. * WebSite: https://git.oschina.net/helyho/JDocker * Licence: Apache v2 License */ public class SwarmJoin { private String listenAddr; private String advertiseAddr; private List remoteAddrs; private String joinToken; public SwarmJoin() { listenAddr = "0.0.0.0:2377"; remoteAddrs = new ArrayList(); } public String getListenAddr() { return listenAddr; } public void setListenAddr(String listenAddr) { this.listenAddr = listenAddr; } public String getAdvertiseAddr() { return advertiseAddr; } public void setAdvertiseAddr(String advertiseAddr) { this.advertiseAddr = advertiseAddr; } public List getRemoteAddrs() { return remoteAddrs; } public void setRemoteAddrs(List remoteAddrs) { this.remoteAddrs = remoteAddrs; } public String getJoinToken() { return joinToken; } public void setJoinToken(String joinToken) { this.joinToken = joinToken; } public static void main(String[] args) { SwarmJoin swarmJoin = new SwarmJoin(); swarmJoin.getRemoteAddrs().add("103.214.142.16:2377"); swarmJoin.setJoinToken("SWMTKN-1-3foky7n2vsqtitqy7lx0e95ypre8xrlwz0w972d24slmdf0xt0-6rtarw25ao45xv0o1g3lk3nkm"); Logger.simple(JSON.formatJson(JSON.toJSON(swarmJoin))); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy