java.lang.Object
net.pincette.rs.ProcessorBase<T,R>
net.pincette.rs.Mapper<T,T>
net.pincette.rs.PassThrough<T>
net.pincette.rs.Cancel<T>
- Type Parameters:
T
- the value type.
- All Implemented Interfaces:
Flow.Processor<T,
,T> Flow.Publisher<T>
,Flow.Subscriber<T>
Cancels the upstream if the given condition is met and completes the stream.
- Since:
- 3.2
- Author:
- Werner Donné
-
Field Summary
Fields inherited from class net.pincette.rs.ProcessorBase
subscriber, subscription
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Flow.Processor<T,
T> void
void
onSubscribe
(Flow.Subscription subscription) Methods inherited from class net.pincette.rs.PassThrough
passThrough
Methods inherited from class net.pincette.rs.ProcessorBase
cancel, cancelling, complete, dispatch, getError, onComplete, onError, setError, subscribe
-
Constructor Details
-
Cancel
Create a Cancel processor.- Parameters:
shouldCancel
- the predicate that checks if the upstream should be cancelled.
-
-
Method Details
-
cancel
-
onNext
-
onSubscribe
- Specified by:
onSubscribe
in interfaceFlow.Subscriber<T>
- Overrides:
onSubscribe
in classProcessorBase<T,
T>
-