package _VisualDVM.Passes.SSH;
import Common.MainModule_;
import _VisualDVM.GlobalData.Machine.Machine;
import _VisualDVM.GlobalData.User.User;
//завязан на текущие машину и юзера
public abstract class CurrentConnectionPass<T> extends ConnectionPass<T> {
    @Override
    protected boolean needsAnimation() {
        return true;
    }
    @Override
    protected boolean canStart(Object... args) {
        return MainModule_.instance.getDb().getTable(User.class).getUI().CheckCurrent(Log);
    }
    @Override
    public void Connect() throws Exception {
        machine = MainModule_.instance.getDb().getTable(Machine.class).getUI().getCurrent();
        user = MainModule_.instance.getDb().getTable(User.class).getUI().getCurrent();
        super.Connect();
    }
}
