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