@ThreadSafe public interface BlockingPullSubscriber extends Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Optional<SequencedMessage> |
messageIfAvailable()
Pull messages if there is any ready to deliver.
|
com.google.api.core.ApiFuture<Void> |
onData()
Returns a
ApiFuture that will be completed when there are messages available. |
com.google.api.core.ApiFuture<Void> onData()
ApiFuture that will be completed when there are messages available.
Unfinished existing ApiFuture returned by onData() will be abandoned and superseded by
new onData() call.
CheckedApiException will be set to the Future if there is underlying permanent
error.
Optional<SequencedMessage> messageIfAvailable() throws CheckedApiException
CheckedApiException - if there is underlying permanent error.void close()
close in interface AutoCloseableclose in interface CloseableCopyright © 2021 Google LLC. All rights reserved.