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)
Parameters | |
---|---|
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)
Parameter | |
---|---|
Name | Description |
clientRequest |
FlowControlRequest |
Exceptions | |
---|---|
Type | Description |
CheckedApiException |
handlePermanentError(CheckedApiException error)
protected void handlePermanentError(CheckedApiException error)
Parameter | |
---|---|
Name | Description |
error |
CheckedApiException |
onClientResponse(List<SequencedMessage> messages)
public void onClientResponse(List<SequencedMessage> messages)
Parameter | |
---|---|
Name | Description |
messages |
List<SequencedMessage> |
Exceptions | |
---|---|
Type | Description |
CheckedApiException |
reset()
public void reset()
start()
protected void start()
stop()
protected void stop()
triggerReinitialize(CheckedApiException streamError)
public void triggerReinitialize(CheckedApiException streamError)
Parameter | |
---|---|
Name | Description |
streamError |
CheckedApiException |