Class BlockingPullSubscriberImpl (1.12.7)

public class BlockingPullSubscriberImpl implements BlockingPullSubscriber

Inheritance

java.lang.Object > BlockingPullSubscriberImpl

Constructors

BlockingPullSubscriberImpl(SubscriberFactory factory, FlowControlSettings settings)

public BlockingPullSubscriberImpl(SubscriberFactory factory, FlowControlSettings settings)
Parameters
NameDescription
factorySubscriberFactory
settingsFlowControlSettings

Methods

close()

public void close()

messageIfAvailable()

public synchronized 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.

Returns
TypeDescription
Optional<SequencedMessage>
Exceptions
TypeDescription
CheckedApiException

onData()

public synchronized 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.

Returns
TypeDescription
ApiFuture<Void>