public abstract class TransformerLike<T,U>
extends java.lang.Object
Constructor and Description |
---|
TransformerLike() |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Invoked after normal completion or failure.
|
boolean |
isComplete()
Invoked after handing off the elements produced from one input element to the
downstream subscribers to determine whether to end stream processing at this point;
in that case the upstream subscription is canceled.
|
void |
onError(java.lang.Throwable cause)
Invoked when failure is signaled from upstream.
|
abstract scala.collection.immutable.Seq<U> |
onNext(T element)
Invoked for each element to produce a (possibly empty) sequence of
output elements.
|
scala.collection.immutable.Seq<U> |
onTermination(scala.Option<java.lang.Throwable> e)
Invoked before the Transformer terminates (either normal completion or after an onError)
to produce a (possibly empty) sequence of elements in response to the
end-of-stream event.
|
public abstract scala.collection.immutable.Seq<U> onNext(T element)
element
- (undocumented)public boolean isComplete()
public scala.collection.immutable.Seq<U> onTermination(scala.Option<java.lang.Throwable> e)
This method is only called if onError(java.lang.Throwable)
does not throw an exception. The default implementation
of onError(java.lang.Throwable)
throws the received cause forcing the failure to propagate downstream immediately.
e
- Contains a non-empty option with the error causing the termination or an empty option
if the Transformer was completed normallypublic void onError(java.lang.Throwable cause)
onTermination(scala.Option<java.lang.Throwable>)
is invoked as a final
step, passing the original cause.cause
- (undocumented)public void cleanup()