package Visual_DVM_2021.Passes.All;
import Visual_DVM_2021.Passes.PassCode;
import Visual_DVM_2021.Passes.SSH.RepositoryServerSSHPass;
import _VisualDVM.Global;
public class ShutdownTestingServer extends RepositoryServerSSHPass {
    @Override
    protected String getServerFileName() {
        return  "TestingSystem.jar";
    }
    @Override
    protected String getServerHomeName() {
        return "_testing_system";
    }
    @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();
    }
}
