public class BlockingPullSubscriberImpl extends Object implements BlockingPullSubscriber
| Constructor and Description |
|---|
BlockingPullSubscriberImpl(SubscriberFactory factory,
FlowControlSettings settings) |
| 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. |
public BlockingPullSubscriberImpl(SubscriberFactory factory, FlowControlSettings settings) throws CheckedApiException
CheckedApiExceptionpublic com.google.api.core.ApiFuture<Void> onData()
BlockingPullSubscriberApiFuture 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.
onData in interface BlockingPullSubscriberpublic Optional<SequencedMessage> messageIfAvailable() throws CheckedApiException
BlockingPullSubscribermessageIfAvailable in interface BlockingPullSubscriberCheckedApiException - if there is underlying permanent error.public void close()
close in interface BlockingPullSubscriberclose in interface AutoCloseableCopyright © 2023 Google LLC. All rights reserved.