Class SubscriberImpl (1.8.0)

public class SubscriberImpl extends ProxyService implements Subscriber, RetryingConnectionObserver<List<SequencedMessage>>

Inheritance

java.lang.Object > AbstractApiService > ProxyService > SubscriberImpl

Implements

Subscriber, com.google.cloud.pubsublite.internal.wire.RetryingConnectionObserver<java.util.List<com.google.cloud.pubsublite.SequencedMessage>>

Constructors

SubscriberImpl(StreamFactories.SubscribeStreamFactory streamFactory, InitialSubscribeRequest baseInitialRequest, SeekRequest initialLocation, Consumer<List<SequencedMessage>> messageConsumer, SubscriberResetHandler resetHandler, boolean retryStreamRaces)

public SubscriberImpl(StreamFactories.SubscribeStreamFactory streamFactory, InitialSubscribeRequest baseInitialRequest, SeekRequest initialLocation, Consumer<List<SequencedMessage>> messageConsumer, SubscriberResetHandler resetHandler, boolean retryStreamRaces)
Parameters
NameDescription
streamFactoryStreamFactories.SubscribeStreamFactory
baseInitialRequestInitialSubscribeRequest
initialLocationSeekRequest
messageConsumerConsumer<List<SequencedMessage>>
resetHandlerSubscriberResetHandler
retryStreamRacesboolean

Methods

allowFlow(FlowControlRequest clientRequest)

public void allowFlow(FlowControlRequest clientRequest)
Parameter
NameDescription
clientRequestFlowControlRequest
Exceptions
TypeDescription
CheckedApiException

handlePermanentError(CheckedApiException error)

protected void handlePermanentError(CheckedApiException error)
Parameter
NameDescription
errorCheckedApiException
Overrides

onClientResponse(List<SequencedMessage> messages)

public void onClientResponse(List<SequencedMessage> messages)
Parameter
NameDescription
messagesList<SequencedMessage>
Exceptions
TypeDescription
CheckedApiException

reset()

public void reset()

start()

protected void start()
Overrides

stop()

protected void stop()
Overrides

triggerReinitialize(CheckedApiException streamError)

public void triggerReinitialize(CheckedApiException streamError)
Parameter
NameDescription
streamErrorCheckedApiException