Module id.xfunction

Class TransformProcessor<T,R>

Object
SynchronousPublisher<R>
TransformProcessor<T,R>
Type Parameters:
T - input type
R - output type
All Implemented Interfaces:
AutoCloseable, Flow.Processor<T,R>, Flow.Publisher<R>, Flow.Subscriber<T>

public class TransformProcessor<T,R> extends SynchronousPublisher<R> implements Flow.Processor<T,R>
Flow.Processor which can be used to transform publisher messages into different type.

Example of transforming integer to String:

 1 -> Publisher -> Transformer (changes to "1") -> Subscriber