T
- the value type pushed@FunctionalInterface public interface MaybeOnSubscribe<T>
subscribe()
method that receives
a MaybeEmitter
instance that allows pushing
an event in a cancellation-safe manner.Modifier and Type | Method and Description |
---|---|
void |
subscribe(@NonNull MaybeEmitter<T> emitter)
Called for each
MaybeObserver that subscribes. |
void subscribe(@NonNull @NonNull MaybeEmitter<T> emitter) throws Throwable
MaybeObserver
that subscribes.emitter
- the safe emitter instance, never null
Throwable
- on error