Class BlockingPullSubscriberImpl
java.lang.Object
com.google.cloud.pubsublite.internal.BlockingPullSubscriberImpl
- All Implemented Interfaces:
BlockingPullSubscriber,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionBlockingPullSubscriberImpl(SubscriberFactory factory, FlowControlSettings settings) -
Method Summary
-
Constructor Details
-
BlockingPullSubscriberImpl
public BlockingPullSubscriberImpl(SubscriberFactory factory, FlowControlSettings settings) throws CheckedApiException - Throws:
CheckedApiException
-
-
Method Details
-
onData
Description copied from interface:BlockingPullSubscriberReturns aApiFuturethat will be completed when there are messages available. Unfinished existingApiFuturereturned by onData() will be abandoned and superseded by new onData() call.CheckedApiExceptionwill be set to the Future if there is underlying permanent error.- Specified by:
onDatain interfaceBlockingPullSubscriber
-
messageIfAvailable
Description copied from interface:BlockingPullSubscriberPull messages if there is any ready to deliver. Any message will only be delivered to one call if there are multiple concurrent calls.- Specified by:
messageIfAvailablein interfaceBlockingPullSubscriber- Throws:
CheckedApiException- if there is underlying permanent error.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceBlockingPullSubscriber
-