java.lang.Object
net.pincette.rs.ProcessorBase<T,R>
net.pincette.rs.Mapper<T,R>
- Type Parameters:
T
- the type of the incoming values.R
- the type of the outgoing values.
- All Implemented Interfaces:
Flow.Processor<T,
,R> Flow.Publisher<R>
,Flow.Subscriber<T>
Transforms a reactive stream. Null values are neither processed nor emitted.
- Since:
- 1.0
- Author:
- Werner Donné
-
Field Summary
Fields inherited from class net.pincette.rs.ProcessorBase
subscriber, subscription
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canRequestMore
(long number) With this method a subclass can regulate the backpressure.protected void
emit
(long number) static <T,
R> Flow.Processor<T, R> Returns a mapping processor with a map function.protected void
more()
Request one more element from the upstream.protected void
more
(long number) Request more elements from the upstream.void
Methods inherited from class net.pincette.rs.ProcessorBase
cancel, complete, getError, onComplete, onError, onSubscribe, setError, subscribe
-
Constructor Details
-
Mapper
-
-
Method Details
-
map
Returns a mapping processor with a map function.- Type Parameters:
T
- the type of the incoming values.R
- the type of the outgoing values.- Parameters:
map
- the map function.- Returns:
- The processor.
- Since:
- 3.0
-
canRequestMore
protected boolean canRequestMore(long number) With this method a subclass can regulate the backpressure.- Parameters:
number
- the strictly positive number of elements.- Returns:
true
- Since:
- 1.6
-
emit
protected void emit(long number) - Specified by:
emit
in classProcessorBase<T,
R>
-
more
protected void more()Request one more element from the upstream.- Since:
- 1.4
-
more
protected void more(long number) Request more elements from the upstream. This will only have an effect when the stream is not in an error state.- Parameters:
number
- the strictly positive number of elements.- Since:
- 1.4
-
onNext
-