T - the value typepublic abstract class Perhaps<T>
extends java.lang.Object
implements org.reactivestreams.Publisher<T>
| Constructor and Description |
|---|
Perhaps() |
| Modifier and Type | Method and Description |
|---|---|
static <T> io.reactivex.functions.Function<Perhaps<T>,Perhaps<T>> |
getOnAssemblyHandler()
Returns the current onAssembly handler.
|
protected static <T> Perhaps<T> |
onAssembly(Perhaps<T> source) |
static <T> void |
setOnAssemblyHandler(io.reactivex.functions.Function<Perhaps<T>,Perhaps<T>> handler)
Set the onAssembly handler.
|
void |
subscribe(org.reactivestreams.Subscriber<? super T> s) |
protected abstract void |
subscribeActual(org.reactivestreams.Subscriber<? super T> s)
Implement this method to react to a Subscriber subscribing to this Perhaps.
|
io.reactivex.subscribers.TestSubscriber<T> |
test()
Creates a TestSubscriber and subscribes it to this Perhaps.
|
io.reactivex.subscribers.TestSubscriber<T> |
test(boolean cancel)
Creates a TestSubscriber, optionally cancels it, and subscribes
it to this Perhaps.
|
io.reactivex.subscribers.TestSubscriber<T> |
test(long initialRequest)
Creates a TestSubscriber with the given initial request and
subscribes it to this Perhaps.
|
io.reactivex.subscribers.TestSubscriber<T> |
test(long initialRequest,
boolean cancel)
Creates a TestSubscriber with the given initial request,
optionally cancels it, and subscribes it to this Perhaps.
|
public static <T> io.reactivex.functions.Function<Perhaps<T>,Perhaps<T>> getOnAssemblyHandler()
T - the target value typepublic static <T> void setOnAssemblyHandler(io.reactivex.functions.Function<Perhaps<T>,Perhaps<T>> handler)
T - the target value typehandler - the handler, null clears the handlerpublic final void subscribe(org.reactivestreams.Subscriber<? super T> s)
subscribe in interface org.reactivestreams.Publisher<T>protected abstract void subscribeActual(org.reactivestreams.Subscriber<? super T> s)
s - the downstream Subscriber, never nullpublic final io.reactivex.subscribers.TestSubscriber<T> test()
public final io.reactivex.subscribers.TestSubscriber<T> test(boolean cancel)
cancel - if true, the TestSubscriber will be cancelled before
subscribing to this Perhapspublic final io.reactivex.subscribers.TestSubscriber<T> test(long initialRequest)
initialRequest - the initial request amount, non-negativepublic final io.reactivex.subscribers.TestSubscriber<T> test(long initialRequest, boolean cancel)
initialRequest - the initial request amount, non-negativecancel - if true, the TestSubscriber will be cancelled before
subscribing to this Perhaps