A quantum optical valve in a nonlinear-linear resonators junction