Hello, I think the most common way to do this kind of thing is to set an extremely high target distance, then have your loop, run(), while checking the status of the sensors. Once a sensor is triggered, then call stepper.stop(), and it'll decelerate to a halt. If you are intent on lining up correctly, then you can issue a new move(...) command to backtrack to the point where the sensor was triggered. Otherwise I guess you could just offset your sensors by the deceleration distance.
So to move endlessly clockwise, do
stepper.move(2147483647L);
and anticlockwise
stepper.move(-2147483646L);