public interface BlockingPullSubscriber extends AutoCloseable
Implements
AutoCloseableMethods
close()
public abstract void close()
messageIfAvailable()
public abstract Optional<SequencedMessage> messageIfAvailable()
Pull messages if there is any ready to deliver. Any message will only be delivered to one call if there are multiple concurrent calls.
Type | Description |
Optional<SequencedMessage> |
Type | Description |
CheckedApiException | if there is underlying permanent error. |
onData()
public abstract ApiFuture<Void> onData()
Returns a 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.
Type | Description |
ApiFuture<Void> |