Unicast Subject
A Subject that queues up events until a single observer subscribes to it, replays those events to it until the observer catches up and then switches to relaying events live to this single observer until this UnicastSubject terminates or the observer unsubscribes.
Please refer to the corresponding RxJava document.
The following factory function is available:
UnicastSubject<T>()
Properties
Functions
Returns a Completable which signals onComplete when this Observable signals onComplete.
Returns an Observable that emits buffered Lists of elements it collects from the source Observable. The first buffer is started with the first element emitted by the source Observable. Every subsequent buffer is started every skip elements, making overlapping buffers possible. Buffers are emitted once the size reaches count elements.
Returns an Observable that emits non-overlapping windows of elements it collects from the source Observable. Window boundaries are determined by the elements emitted by the specified boundaries Observable.
Returns an Observable that emits possibly overlapping windows of elements it collects from the source Observable. Every new window is opened when the opening Observable emits an element. Each window is closed when the corresponding Observable returned by the closing function completes.
Returns an Observable that emits non-overlapping windows of elements it collects from the source Observable.
Returns an Observable that emits possibly overlapping windows of elements it collects from the source Observable.
Collects elements emitted by the finite source Observable into a mutable data structure C and returns a Single that emits this structure. The accumulator should mutate the structure adding elements into it.
Returns an Observable that applies the mapper to every element emitted by the source Observable and concatenates the returned Observables.
Returns an Observable that applies the mapper to every element emitted by the source Observable and concatenates the returned Maybes.
Returns an Observable that applies the mapper to every element emitted by the source Observable and concatenates the returned Singles.
Concatenates both the source and the other Observables.
Returns an Observable that first emits all elements from the source Observable and then the provided value.
Returns an Observable that mirrors the source Observable, but drops elements that are followed by newer ones within a computed debounce duration.
Returns an Observable that mirrors the source Observable, but drops elements that are followed by newer ones before the timeout expires on a specified Scheduler.
Returns an Observable that emits the elements emitted from the source Observable or the specified defaultValue if the source Observable is empty.
Delays onNext and onComplete signals from the current Observable for the specified time. The onError signal is not delayed by default, which can be enabled by setting the delayError flag.
Delays the actual subscription to the Observable for the specified time.
Returns an Observable that emits all elements emitted by the source Observable that are distinct from their immediate predecessors when compared with each other via the provided comparator.
Returns an Observable that emits all elements emitted by the source Observable that are distinct from their immediate predecessors. Each emitted element is mapped to a key using the provided keySelector. Each pair of sibling keys is compared using the provided comparator.
Calls the action when the Observable signals onComplete. The action is called after the observer is called.
Calls the shared action when the Disposable sent to the observer via onSubscribe is disposed. The action is called after the upstream is disposed.
Calls the consumer with the emitted Throwable when the Observable signals onError. The consumer is called after the observer is called.
Calls the action when one of the following events occur:
Calls the consumer with the emitted element when the Observable signals onNext. The consumer is called after the observer is called.
Calls the shared action for each new observer with the Disposable sent to the downstream. The action is called for each new observer after its onSubscribe callback is called.
Calls the action when the Observable signals a terminal event: onComplete or onError. The action is called after the observer is called.
Calls the action with the emitted value when the Observable signals onComplete. The action is called before the observer is called.
Calls the shared action when the Disposable sent to the observer via onSubscribe is disposed. The action is called before the upstream is disposed.
Calls the consumer with the emitted Throwable when the Observable signals onError. The consumer is called before the observer is called.
Calls the action when one of the following events occur:
Calls the consumer with the emitted value when the Observable signals onNext. The consumer is called before the observer is called.
Calls the shared action for each new observer with the Disposable sent to the downstream. The action is called for each new observer before its onSubscribe callback is called.
Calls the action when the Observable signals a terminal event: onComplete or onError. The action is called before the observer is called.
Filters elements emitted by the Observable using the provided predicate.
Returns a Maybe that emits only the very first element emitted by the source Observable, or completes if the source Observable is empty.
Returns a Single that emits only the very first element emitted by the source Observable, or defaultValue if the source Observable is empty.
Returns a Single that emits only the very first element emitted by the source Observable, or a value returned by defaultValueSupplier if the source Observable is empty.
Returns a Single that emits only the very first element emitted by the source Observable, or signals a Throwable returned by errorSupplier if the source Observable is empty.
Returns a Single that emits only the very first element emitted by the source Observable, or signals NoSuchElementException if the source Observable is empty.
Calls the mapper for each element emitted by the Observable and subscribes to the returned inner Observable. Emits elements from inner Observables. The maximum number of concurrently subscribed inner Observables is determined by the maxConcurrency argument.
Calls the mapper for each element emitted by the Observable and subscribes to the returned inner Observable. For each element U emitted by an inner Observable, calls resultSelector with the original source element T and the inner element U, and emits the result element R. The maximum number of concurrently subscribed inner Observables is determined by the maxConcurrency argument.
Calls the mapper for each element emitted by the Observable and subscribes to the returned inner Completable. The maximum number of concurrently subscribed inner Completables is determined by the maxConcurrency argument.
Calls the transformer for each element emitted by the Observable and emits all elements from the returned Iterables.
Calls the mapper for each element emitted by the Observable and subscribes to the returned inner Maybe. Emits elements from inner Maybes. The maximum number of concurrently subscribed inner Maybes is determined by the maxConcurrency argument.
Calls the mapper for each element emitted by the Observable and subscribes to the returned inner Maybe. For an element U emitted by an inner Maybe, calls resultSelector with the original source element T and the inner element U, and emits the result element R. The maximum number of concurrently subscribed inner Maybes is determined by the maxConcurrency argument.
Calls the mapper for each element emitted by the Observable and subscribes to the returned inner Single. Emits elements from inner Singles. The maximum number of concurrently subscribed inner Singles is determined by the maxConcurrency argument.
Calls the mapper for each element emitted by the Observable and subscribes to the returned inner Single. For an element U emitted by an inner Single, calls resultSelector with the original source element T and the inner element U, and emits the result element R. The maximum number of concurrently subscribed inner Singles is determined by the maxConcurrency argument.
Concatenates all emitted Observables. See concatMap for more information.
Creates and returns an ObservableObserver that can be used to subscribe this Subject to an Observable. All signals from all Observables subscribed using the returned ObservableObserver are sent to this Subject.
Convenience method for ValueCallback.onNext
Converts elements emitted by the Observable using the provided mapper and emits the result elements.
Maps each Iterable emitted by the Observable using the provided mapper and emits Lists with the result elements. See map for more information.
Maps each Iterable emitted by the Observable using the provided mapper into a MutableCollection returned by collectionSupplier. Emits MutableCollections with the result elements. See map for more information.
Returns an Observable that emits only non-null elements from the source Observable.
Signals all events of the Observable on the specified Scheduler.
Returns an Observable that emits only elements of type T from the source Observable.
Notifies the host (typically an Observer) about completion
Returns an Observable which completes when this Observable signals onError.
When the Observable signals onError, resumes the flow with next Observable.
When the Observable signals onError, resumes the flow with a new Observable returned by nextSupplier.
When the Observable signals onError, emits a value returned by valueSupplier.
When the Observable signals onError, emits the value.
Returns a ConnectableObservable that shares a single subscription to the source Observable. The source Observable is subscribed when the ConnectableObservable.connect method is called, and is unsubscribed when the returned Disposable is disposed.
For every subscription, calls the selector with an Observable that shares a single subscription to this Observable, and emits elements from the returned Observable.
Returns a Maybe that subscribes to this Observable and calls the reducer function with a result of a previous reducer invocation and a current element. The returned Maybe emits a result of the final reducer invocation, or completes if the source Observable emitted less than two elements.
Returns an Observable that repeats the sequence of this Observable at most times times.
Returns an Observable that calls the predicate when this Observable completes and resubscribes to this Observable if the predicate returned false.
Returns an Observable that calls the handler when this Observable completes, subscribes to the returned Maybe, and resubscribes to this Observable when the Maybe succeeds with any value. If the returned Maybe completes then the returned Observable completes as well.
Returns a ConnectableObservable that shares a single subscription to the source Observable and replays at most bufferSize elements emitted by the source Observable to any future subscriber.
Returns an Observable that automatically resubscribes to this Observable if it signals onError and the predicate returns true for that specific Throwable and attempt.
Returns an Observable that automatically resubscribes to this Observable at most times times if it signals onError.
Returns an Observable that automatically resubscribes to this Observable if it signals onError and the Observable returned by the handler function emits a value for that specific Throwable.
Returns an Observable that emits the most recently emitted element (if any) emitted by the source Observable within periodic time intervals.
Returns an Observable that subscribes to the source Observable and calls the accumulator function with a result of a previous accumulator invocation and a current element. The returned Observable emits every value returned by the accumulator function.
Returns an Observable that subscribes to the source Observable and calls the accumulator function first with the specified seed value and a first element emitted by the source Observable. Then for every subsequent element emitted by the source Observable, calls accumulator with its previous result the emitted element. The returned Observable emits every value returned by the accumulator function.
Returns an Observable that subscribes to the source Observable and calls the accumulator function first with a value returned by getSeed function and a first element emitted by the source Observable. Then for every subsequent element emitted by the source Observable, calls accumulator with its previous result the emitted element. The returned Observable emits every value returned by the accumulator function.
Returns an Observable that shares a single subscription to the source Observable.
Returns an Observable that skips the first count elements emitted by the source Observable and emits the remainder.
Returns an Observable that concatenates the other and the source Observables.
Returns an Observable that first emits the specified value and then subscribes to the source Observable.
Subscribes to the Observable and provides event callbacks.
Returns an Observable that subscribes to the source Observable on the specified Scheduler.
Returns an Observable that emits the elements emitted by the source Observable, or the elements of the otherObservable if the source Observable is empty.
Returns an Observable that emits the elements emitted by the source Observable, or the elements of an Observable returned by the otherObservable function if the source Observable is empty.
Calls the mapper for each element emitted by the Observable and subscribes to the returned inner Observable, disposing any previously subscribed inner Observable. Emits elements of a most recent inner Observable.
Calls the mapper for each element emitted by the Observable and subscribes to the returned inner Observable, disposing any previously subscribed inner Observable. For each element U emitted by a most recent inner Observable, calls resultSelector with the original source element T and the inner element U, and emits the result element R.
Calls the mapper for each element emitted by the Observable and subscribes to the returned inner Completable, disposing any previously subscribed inner Completable.
Calls the mapper for each element emitted by the Observable and subscribes to the returned inner Maybe, disposing any previously subscribed inner Maybe. Emits elements from inner Maybes.
Calls the mapper for each element emitted by the Observable and subscribes to the returned inner Maybe, disposing any previously subscribed inner Maybe. Emits elements from inner Maybes. For an element U emitted by an inner Maybe, calls resultSelector with the original source element T and the inner element U, and emits the result element R.
Calls the mapper for each element emitted by the Observable and subscribes to the returned inner Single, disposing any previously subscribed inner Single. Emits elements from inner Singles.
Calls the mapper for each element emitted by the Observable and subscribes to the returned inner Single, disposing any previously subscribed inner Single. Emits elements from inner Singles. For an element U emitted by an inner Single, calls resultSelector with the original source element T and the inner element U, and emits the result element R.
Emit only the first limit elements emitted by source Observable.
Returns an Observable that emits elements emitted by the source Observable until the other Observable emits an element.
Returns an Observable that emits elements emitted by the source Observable, checks the specified predicate for each element and completes when it returned true
Returns an Observable that checks the specified predicate for each element emitted by the source Observable, and emits the element if the predicate returned true or completes if it returned false.
Returns an Observable that emits only the first element emitted by the source Observable during a time window defined by window, which begins with the emitted element.
Emits a first element from the source Observable, then calls the timeout supplier and and opens a time window defined by a returned Completable. Then does not emit any elements from the source Observable while the time window is open, and only emits a most recent element when the time window closes.
Emits a first element from the source Observable and opens a time window specified by timeout. Then does not emit any elements from the source Observable while the time window is open, and only emits a most recent element when the time window closes.
Returns an Observable that emits elements from the source Observable and counts a timeout specified by timeout. If the timeout ever hits, disposes the source Observable and subscribes to the other Observable, if any.
Returns a Single that emits a Map containing all elements emitted by the finite source Observable, associated with keys returned by keySelector.
Returns a Single that emits a Map containing all elements emitted by the finite source Observable, transformed by valueSelector and associated with keys returned by keySelector.
Returns an Observable that emits windows of elements it collects from the source Observable.
Returns an Observable that emits non-overlapping windows of elements it collects from the source Observable. Window boundaries are determined by the elements emitted by the specified boundaries Observable.
Returns an Observable that emits possibly overlapping windows of elements it collects from the source Observable. Every new window is opened when the opening Observable emits an element. Each window is closed when the corresponding Observable returned by the closing function completes.
Returns an Observable that emits non-overlapping windows of elements it collects from the source Observable.
Returns an Observable that emits possibly overlapping windows of elements it collects from the source Observable.
Combines the elements emitted by the source Observable with a latest emitted element emitted by the other Observable. Elements are combined using the mapper function.
Combines the elements emitted by the source Observable with the latest emitted elements emitted by the others Observables. Elements are combined using the mapper function.
Combines the elements emitted by the source Observable with latest emitted elements emitted by other1 and other2 Observables. Elements are combined using the mapper function.
Combines the elements emitted by the source Observable with latest emitted elements emitted by other1, other2 and other3 Observables. Elements are combined using the mapper function.
Returns an Observable that emits elements that are the result of applying the specified mapper function to pairs of values, one each from the source Observable and another from the specified other Observable.