Mercurial > hg > Database > Alice
view src/main/java/alice/topology/node/TopologyNodeConfig.java @ 374:5ceb1c4db167 multicast
create setter and getter for TopologyNodeConfig member-variables
author | sugi |
---|---|
date | Wed, 04 Jun 2014 00:18:26 +0900 |
parents | 8f71c3e6f11d |
children | aefbe41fcf12 |
line wrap: on
line source
package alice.topology.node; import alice.daemon.Config; public class TopologyNodeConfig extends Config { private String managerHostName; private int managerPort; public TopologyNodeConfig(String[] args) { super(args); for (int i = 0; i< args.length; i++) { if ("-host".equals(args[i])) { setManagerHostName(args[++i]); } else if ("-port".equals(args[i])) { setManagerPort(Integer.parseInt(args[++i])); } } } public String getManagerHostName() { return managerHostName; } public void setManagerHostName(String managerHostName) { this.managerHostName = managerHostName; } public int getManagerPort() { return managerPort; } public void setManagerPort(int managerPort) { this.managerPort = managerPort; } }