I have a method that sends a request to get the status of a job and returns the status, it looks like this:
Mono<JobStatus> getJobStatus() {...}
The JobStatus
object has a method JobStatus.isDone()
which returns whether the pending job is done or not.
Is there a way for me to keep subscribing to the mono until JobStatus.isDone()
is true? i.e. something like getJobStatus().keepSubscribingUntil(status -> status.isDone())