![JAR search and dependency download from the Maven repository](/logo.png)
com.googlecode.openbox.server.ServerVisitor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ssh Show documentation
Show all versions of ssh Show documentation
This is remote linux SSH module
The newest version!
package com.googlecode.openbox.server;
import java.util.HashMap;
import java.util.Map;
/**
* Created by jerrycai on 3/29/16.
*/
public class ServerVisitor {
private Server[] servers;
private ServerVisitor(Server[] servers) {
this.servers = servers;
}
public static ServerVisitor newIntance(Server[] servers) {
return new ServerVisitor(servers);
}
public interface Action {
T access(Server server);
}
public Map visit(Action action) {
Map results = new HashMap();
for (Server server : servers) {
results.put(server, action.access(server));
}
return results;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy