FROM - Data type this transformer receivesTO - Type of transformed datapublic interface DataTransformer<FROM,TO>
DataObservers. A transformer is set via
SubscriptionBuilder.transform(DataTransformer).
Note that a transformer is not required to actually "transform" any data.
Technically, it's fine to return the same data it received and just do some processing with it.
Threading notes: Note that the transformer is always executed asynchronously.
It is OK to perform long lasting operations.| Modifier and Type | Method and Description |
|---|---|
TO |
transform(FROM source)
Transforms/processes the given data.
|
TO transform(FROM source) throws java.lang.Exception
source - data to be transformedjava.lang.Exception - Transformers may throw any exceptions, which can be reacted on via
SubscriptionBuilder.onError(ErrorObserver).