Top Description Inners Constructors Methods
rx.internal.operators

public final Class OperatorMaterialize<T>

extends Object
implements Observable.Operator<Notification<T>, T>
Class Inheritance
All Implemented Interfaces
rx.Observable.Operator, rx.functions.Func1, rx.functions.Function
Type Parameters
<T>
the value type
Imports
java.util.concurrent.atomic.AtomicLong, rx.*, .Observable.Operator, rx.plugins.RxJavaHooks

Turns all of the notifications from an Observable into onNext emissions, and marks them with their original notification types within Notification objects.

See here for the Microsoft Rx equivalent.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
OperatorMaterialize.Holder

Lazy initialization via inner-class holder.

pack-priv static class

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Subscriber<? super T>
call(final Subscriber<? super Notification<T>> child)

Implements rx.functions.Func1.call.

public static <
the value type
T
>
OperatorMaterialize<T>

Returns:

a singleton instance of this stateless operator.
instance
()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

OperatorMaterializeback to summary
pack-priv OperatorMaterialize()

Method Detail

callback to summary
public Subscriber<? super T> call(final Subscriber<? super Notification<T>> child)

Implements rx.functions.Func1.call.

Annotations
@Override
instanceback to summary
public static <T> OperatorMaterialize<T> instance()
Parameters
<T>
the value type
Returns:OperatorMaterialize<T>

a singleton instance of this stateless operator.

Annotations
@SuppressWarnings:unchecked
rx.internal.operators back to summary

pack-priv final Class OperatorMaterialize.Holder

extends Object
Class Inheritance

Lazy initialization via inner-class holder.

Field Summary

Modifier and TypeField and Description
pack-priv static final OperatorMaterialize<Object>
INSTANCE

A singleton instance.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
pack-priv static final OperatorMaterialize<Object> INSTANCE

A singleton instance.

Constructor Detail

Holderback to summary
pack-priv Holder()
rx.internal.operators back to summary

pack-priv Class OperatorMaterialize.ParentSubscriber<T>

extends Subscriber<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private boolean
private final Subscriber<? super Notification<T>>
private boolean
private final AtomicLong
private volatile Notification<T>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
private void
public void
onCompleted()

Implements rx.Observer.onCompleted.

Notifies the Observer that the Observable has finished sending push-based notifications.
public void
onError(Throwable
the exception encountered by the Observable
e
)

Implements rx.Observer.onError.

Notifies the Observer that the Observable has experienced an error condition.
public void
onNext(T
the item emitted by the Observable
t
)

Implements rx.Observer.onNext.

Provides the Observer with a new item to observe.
public void
onStart()

Overrides rx.Subscriber.onStart.

This method is invoked when the Subscriber and Observable have been connected but the Observable has not yet begun to emit items or send notifications to the Subscriber.
pack-priv void
requestMore(long n)

Inherited from rx.Subscriber:
addisUnsubscribedrequestsetProducerunsubscribe

Field Detail

busyback to summary
private boolean busy
childback to summary
private final Subscriber<? super Notification<T>> child
missedback to summary
private boolean missed
requestedback to summary
private final AtomicLong requested

Hides rx.Subscriber.requested.

terminalNotificationback to summary
private volatile Notification<T> terminalNotification

Constructor Detail

ParentSubscriberback to summary
pack-priv ParentSubscriber(Subscriber<? super Notification<T>> child)

Method Detail

decrementRequestedback to summary
private void decrementRequested()
drainback to summary
private void drain()
onCompletedback to summary
public void onCompleted()

Implements rx.Observer.onCompleted.

Doc from rx.Observer.onCompleted.

Notifies the Observer that the Observable has finished sending push-based notifications.

The Observable will not call this method if it calls onError.

Annotations
@Override
onErrorback to summary
public void onError(Throwable e)

Implements rx.Observer.onError.

Doc from rx.Observer.onError.

Notifies the Observer that the Observable has experienced an error condition.

If the Observable calls this method, it will not thereafter call onNext or onCompleted.

Parameters
e:Throwable

the exception encountered by the Observable

Annotations
@Override
onNextback to summary
public void onNext(T t)

Implements rx.Observer.onNext.

Doc from rx.Observer.onNext.

Provides the Observer with a new item to observe.

The Observable may call this method 0 or more times.

The Observable will not call this method again after it calls either onCompleted or onError.

Parameters
t:T

the item emitted by the Observable

Annotations
@Override
onStartback to summary
public void onStart()

Overrides rx.Subscriber.onStart.

Doc from rx.Subscriber.onStart.

This method is invoked when the Subscriber and Observable have been connected but the Observable has not yet begun to emit items or send notifications to the Subscriber. Override this method to add any useful initialization to your subscription, for instance to initiate backpressure.

Annotations
@Override
requestMoreback to summary
pack-priv void requestMore(long n)