Class SubscriberImpl
java.lang.Object
com.google.api.core.AbstractApiService
com.google.cloud.pubsublite.internal.ProxyService
com.google.cloud.pubsublite.internal.wire.SubscriberImpl
- All Implemented Interfaces:
com.google.api.core.ApiService,RetryingConnectionObserver<List<SequencedMessage>>,Subscriber
public class SubscriberImpl
extends ProxyService
implements Subscriber, RetryingConnectionObserver<List<SequencedMessage>>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.api.core.ApiService
com.google.api.core.ApiService.Listener, com.google.api.core.ApiService.State -
Constructor Summary
ConstructorsConstructorDescriptionSubscriberImpl(StreamFactories.SubscribeStreamFactory streamFactory, InitialSubscribeRequest baseInitialRequest, SeekRequest initialLocation, Consumer<List<SequencedMessage>> messageConsumer, SubscriberResetHandler resetHandler, boolean retryStreamRaces) -
Method Summary
Modifier and TypeMethodDescriptionvoidallowFlow(FlowControlRequest clientRequest) protected voidvoidonClientResponse(List<SequencedMessage> messages) voidreset()protected voidstart()protected voidstop()voidtriggerReinitialize(CheckedApiException streamError) Methods inherited from class com.google.cloud.pubsublite.internal.ProxyService
addServices, addServices, doStart, doStop, onPermanentErrorMethods inherited from class com.google.api.core.AbstractApiService
addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsyncMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.api.core.ApiService
addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync
-
Constructor Details
-
SubscriberImpl
public SubscriberImpl(StreamFactories.SubscribeStreamFactory streamFactory, InitialSubscribeRequest baseInitialRequest, SeekRequest initialLocation, Consumer<List<SequencedMessage>> messageConsumer, SubscriberResetHandler resetHandler, boolean retryStreamRaces) throws com.google.api.gax.rpc.ApiException - Throws:
com.google.api.gax.rpc.ApiException
-
-
Method Details
-
start
protected void start()- Overrides:
startin classProxyService
-
stop
protected void stop()- Overrides:
stopin classProxyService
-
handlePermanentError
- Overrides:
handlePermanentErrorin classProxyService
-
allowFlow
- Specified by:
allowFlowin interfaceSubscriber- Throws:
CheckedApiException
-
reset
public void reset() -
triggerReinitialize
- Specified by:
triggerReinitializein interfaceRetryingConnectionObserver<List<SequencedMessage>>
-
onClientResponse
- Specified by:
onClientResponsein interfaceRetryingConnectionObserver<List<SequencedMessage>>- Throws:
CheckedApiException
-