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