public class SubscriberImpl extends ProxyService implements Subscriber, RetryingConnectionObserver<List<SequencedMessage>>
Implements
Subscriber, com.google.cloud.pubsublite.internal.wire.RetryingConnectionObserver<java.util.List<com.google.cloud.pubsublite.proto.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)
Name | Description |
streamFactory | StreamFactories.SubscribeStreamFactory |
baseInitialRequest | InitialSubscribeRequest |
initialLocation | SeekRequest |
messageConsumer | Consumer<List<SequencedMessage>> |
resetHandler | SubscriberResetHandler |
retryStreamRaces | boolean |
Methods
allowFlow(FlowControlRequest clientRequest)
public void allowFlow(FlowControlRequest clientRequest)
Name | Description |
clientRequest | FlowControlRequest |
Type | Description |
CheckedApiException |
handlePermanentError(CheckedApiException error)
protected void handlePermanentError(CheckedApiException error)
Name | Description |
error | CheckedApiException |
onClientResponse(List<SequencedMessage> messages)
public void onClientResponse(List<SequencedMessage> messages)
Name | Description |
messages | List<SequencedMessage> |
Type | Description |
CheckedApiException |
reset()
public void reset()
start()
protected void start()
stop()
protected void stop()
triggerReinitialize(CheckedApiException streamError)
public void triggerReinitialize(CheckedApiException streamError)
Name | Description |
streamError | CheckedApiException |