package _VisualDVM.Passes.All;
import _VisualDVM.Global;
import _VisualDVM.Passes.PassCode;
import _VisualDVM.Passes.SSH.RepositoryServerSSHPass;
public class StartComponentsServer extends RepositoryServerSSHPass {
    @Override
    public String getIconPath() {
        return "/icons/GreenStart.png";
    }
    @Override
    protected String getServerHomeName() {
        return "_sapfor_x64";
    }
    @Override
    protected String getServerFileName() {
        return "VisualSapfor.jar";
    }
    //--
    @Override
    protected boolean canStart(Object... args) throws Exception {
        if (Global.mainModule.getPass(PassCode.PingComponentsServer).Do(true)) {
            Log.Writeln_("Сервер уже активен!");
            return false;
        }
        return true;
    }
    @Override
    protected void ServerAction() throws Exception {
        StartServer();
    }
    @Override
    protected boolean validate() {
        return Global.mainModule.getPass(PassCode.PingComponentsServer).Do();
    }
}
