package _VisualDVM.Passes.Server;
import _VisualDVM.Passes.SSH.RepositoryServerSSHPass;
import _VisualDVM.Repository.Server.RepositoryServer;
public abstract class StartServerPass<S extends RepositoryServer> extends RepositoryServerSSHPass<S> {
    @Override
    public String getIconPath() {
        return "/Common/icons/GreenStart.png";
    }
    @Override
    protected boolean canStart(Object... args) throws Exception {
        if (getServer().PingFromClient()) {
            Log.Writeln_("Сервер уже активен!");
            return false;
        }
        return super.canStart();
    }
    @Override
    protected void ServerAction() throws Exception {
        StartServer();
    }
}
