Interface BlockingPullSubscriber

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
BlockingPullSubscriberImpl

@ThreadSafe public interface BlockingPullSubscriber extends AutoCloseable
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    Pull messages if there is any ready to deliver.
    com.google.api.core.ApiFuture<Void>
    Returns a ApiFuture that will be completed when there are messages available.
  • Method Details

    • onData

      com.google.api.core.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.

    • messageIfAvailable

      Optional<SequencedMessage> messageIfAvailable() throws CheckedApiException
      Pull messages if there is any ready to deliver. Any message will only be delivered to one call if there are multiple concurrent calls.
      Throws:
      CheckedApiException - if there is underlying permanent error.
    • close

      void close()
      Specified by:
      close in interface AutoCloseable