com.googlecode.openbox.server.ServerAccessor 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;
/**
* Created by jerrycai on 3/29/16.
*/
public final class ServerAccessor {
private ServerVisitor visitor;
private ServerAccessor(Server[] servers) {
this.visitor = ServerVisitor.newIntance(servers);
}
public static ServerAccessor newInstance(Server[] servers) {
return new ServerAccessor(servers);
}
public static abstract class AccessAction implements ServerVisitor.Action {
public abstract void action(Server server);
@Override
public Void access(Server server) {
action(server);
return null;
}
}
public void access(AccessAction action) {
visitor.visit(action);
}
}