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