Class SingleThreadedBufferingSubscriber<T>
java.lang.Object
io.micronaut.core.async.subscriber.SingleThreadedBufferingSubscriber<T>
- Type Parameters:
- T- The type
- All Implemented Interfaces:
- Completable,- Emitter<T>,- Subscriber<T>
- Direct Known Subclasses:
- SingleThreadedBufferingProcessor
public abstract class SingleThreadedBufferingSubscriber<T>
extends Object
implements Subscriber<T>, Emitter<T>
A 
Subscriber designed to be used by a single thread that buffers incoming data for the purposes of managing
 back pressure.- Since:
- 1.0
- Author:
- Graeme Rocher
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected static enumBack pressure state.protected classA downstream subscription.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract voidImplementSubscriber.onComplete().protected abstract voidImplementSubscriber.onError(Throwable).protected abstract voidImplementSubscriber.onNext(Object).protected abstract voiddoOnSubscribe(Subscription subscription) ImplementSubscriber.onSubscribe(Subscription).protected Subscriptionfinal void* Successful terminal state.final voidFailed terminal state.final voidData notification sent by thePublisherin response to requests toSubscription.request(long).final voidonSubscribe(Subscription subscription) protected voidprovideDownstreamSubscription(Subscriber subscriber) 
- 
Field Details- 
upstreamBuffer
- 
upstreamState
- 
upstreamDemandprotected long upstreamDemand
- 
upstreamSubscription
 
- 
- 
Constructor Details- 
SingleThreadedBufferingSubscriberpublic SingleThreadedBufferingSubscriber()
 
- 
- 
Method Details- 
onSubscribe- Specified by:
- onSubscribein interface- Subscriber<T>
 
- 
onCompletepublic final void onComplete()Description copied from interface:Completable* Successful terminal state. To be called when the operation is complete.- Specified by:
- onCompletein interface- Completable
- Specified by:
- onCompletein interface- Subscriber<T>
- See Also:
 
- 
onNextDescription copied from interface:EmitterData notification sent by thePublisherin response to requests toSubscription.request(long).
- 
onErrorDescription copied from interface:EmitterFailed terminal state.No further events will be sent even if Subscription.request(long)is invoked again.
- 
doOnSubscribeImplementSubscriber.onSubscribe(Subscription).- Parameters:
- subscription- The subscription
 
- 
doOnNextImplementSubscriber.onNext(Object).- Parameters:
- message- The message
 
- 
doOnErrorImplementSubscriber.onError(Throwable).- Parameters:
- t- The throwable
 
- 
doOnCompleteprotected abstract void doOnComplete()ImplementSubscriber.onComplete().
- 
provideDownstreamSubscription- Parameters:
- subscriber- The subscriber
 
- 
newDownstreamSubscription- Returns:
- The subscription
 
 
-