new MyTransformer(), new MyAction()calls everywhere in my code and instead create factory methods. So I might have a
RxLoggerclass that has actions related to logging, which you would call like
Operatorswhich contains factory methods for creating custom Transformers, Operators, Functions and Actions. Most of these are generic and aren't associated with any particular data type. I'm trying to get rid of this class but am struggling to come up with a good alternative
clickStream.withLatestFrom(dataStream, (left, right) -> right).subscribe(parseData)
public static final Observable. Objects from other classes can subscribe to the static Observable. Is this an antipattern? It doesn't smell right to me, but I wanted a second opinion. Normally I'm very wary about memory leaks in these kinds of scenarios, and implications for unit testing.
onNextmethod, the Observable's
doOnTerminatecallbacks never fire
RuntimeExceptionmay be thrown (
NullPointerException, etc.). The behavior I'm seeing is that if a
RuntimeExceptionis thrown in the subscriber
onErrorcallback is firing, but the
doOnTerminateactions are not.