Top Inners Fields Constructors Methods
rx.internal.operators

public final Class OnSubscribeCreate<T>

extends Object
implements Observable.OnSubscribe<T>
Class Inheritance
All Implemented Interfaces
rx.Observable.OnSubscribe, rx.functions.Action1, rx.functions.Action, rx.functions.Function
Imports
java.util.Queue, java.util.concurrent.atomic.*, rx.*, .Observable.OnSubscribe, rx.exceptions.MissingBackpressureException, rx.functions.*, rx.internal.subscriptions.CancellableSubscription, rx.internal.util.RxRingBuffer, rx.internal.util.atomic.SpscUnboundedAtomicArrayQueue, rx.internal.util.unsafe.*, rx.plugins.RxJavaHooks, rx.subscriptions.SerialSubscription

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv abstract static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv abstract static class

Field Summary

Modifier and TypeField and Description
pack-priv final Emitter.BackpressureMode
pack-priv final Action1<Emitter<T>>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
call(Subscriber<? super T> t)

Implements rx.functions.Action1.call.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

backpressureback to summary
pack-priv final Emitter.BackpressureMode backpressure
Emitterback to summary
pack-priv final Action1<Emitter<T>> Emitter

Constructor Detail

OnSubscribeCreateback to summary
public OnSubscribeCreate(Action1<Emitter<T>> Emitter, Emitter.BackpressureMode backpressure)

Method Detail

callback to summary
public void call(Subscriber<? super T> t)

Implements rx.functions.Action1.call.

Annotations
@Override
rx.internal.operators back to summary

pack-priv abstract Class OnSubscribeCreate.BaseEmitter<T>

extends AtomicLong
implements Emitter<T>, Producer, Subscription
Class Inheritance
All Implemented Interfaces
rx.Subscription, rx.Producer, rx.Emitter, rx.Observer
Known Direct Subclasses
rx.internal.operators.OnSubscribeCreate.NoneEmitter, rx.internal.operators.OnSubscribeCreate.NoOverflowBaseEmitter, rx.internal.operators.OnSubscribeCreate.BufferEmitter, rx.internal.operators.OnSubscribeCreate.LatestEmitter

Field Summary

Modifier and TypeField and Description
pack-priv final Subscriber<? super T>
pack-priv final SerialSubscription
private static final long

Constructor Summary

AccessConstructor and Description
public
BaseEmitter(Subscriber<? super T> actual)

Method Summary

Modifier and TypeMethod and Description
public final boolean
isUnsubscribed()

Implements rx.Subscription.isUnsubscribed.

Indicates whether this Subscription is currently unsubscribed.
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.
pack-priv void
pack-priv void
public final void
request(long
the maximum number of items you want this Producer to produce, or Long.MAX_VALUE if you want the Producer to produce items at its own pace
n
)

Implements rx.Producer.request.

Request a certain maximum number of items from this Producer.
public final long
requested()

Implements rx.Emitter.requested.

The current outstanding request amount.
public final void
setCancellation(Cancellable
the cancellable resource, null is allowed
c
)

Implements rx.Emitter.setCancellation.

Sets a Cancellable on this emitter; any previous Subscription or Cancellation will be unsubscribed/cancelled.
public final void
setSubscription(Subscription
the subscription, null is allowed
s
)

Implements rx.Emitter.setSubscription.

Sets a Subscription on this emitter; any previous Subscription or Cancellation will be unsubscribed/cancelled.
public final void
unsubscribe()

Implements rx.Subscription.unsubscribe.

Stops the receipt of notifications on the Subscriber that was registered when this Subscription was received.
Inherited from java.util.concurrent.atomic.AtomicLong:
accumulateAndGetaddAndGetcompareAndExchangecompareAndExchangeAcquirecompareAndExchangeReleasecompareAndSetdecrementAndGetdoubleValuefloatValuegetgetAcquiregetAndAccumulategetAndAddgetAndDecrementgetAndIncrementgetAndSetgetAndUpdategetOpaquegetPlainincrementAndGetintValuelazySetlongValuesetsetOpaquesetPlainsetReleasetoStringupdateAndGetweakCompareAndSetweakCompareAndSetAcquireweakCompareAndSetPlainweakCompareAndSetReleaseweakCompareAndSetVolatile

Field Detail

actualback to summary
pack-priv final Subscriber<? super T> actual
serialback to summary
pack-priv final SerialSubscription serial
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.concurrent.atomic.AtomicLong.serialVersionUID.

Constructor Detail

BaseEmitterback to summary
public BaseEmitter(Subscriber<? super T> actual)

Method Detail

isUnsubscribedback to summary
public final boolean isUnsubscribed()

Implements rx.Subscription.isUnsubscribed.

Doc from rx.Subscription.isUnsubscribed.

Indicates whether this Subscription is currently unsubscribed.

Returns:boolean

true if this Subscription is currently unsubscribed, false otherwise

Annotations
@Override
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
onRequestedback to summary
pack-priv void onRequested()
onUnsubscribedback to summary
pack-priv void onUnsubscribed()
requestback to summary
public final void request(long n)

Implements rx.Producer.request.

Doc from rx.Producer.request.

Request a certain maximum number of items from this Producer. This is a way of requesting backpressure. To disable backpressure, pass Long.MAX_VALUE to this method.

Requests are additive but if a sequence of requests totals more than Long.MAX_VALUE then Long.MAX_VALUE requests will be actioned and the extras may be ignored. Arriving at Long.MAX_VALUE by addition of requests cannot be assumed to disable backpressure. For example, the code below may result in Long.MAX_VALUE requests being actioned only.

request(100);
request(Long.MAX_VALUE-1);
Parameters
n:long

the maximum number of items you want this Producer to produce, or Long.MAX_VALUE if you want the Producer to produce items at its own pace

Annotations
@Override
requestedback to summary
public final long requested()

Implements rx.Emitter.requested.

Doc from rx.Emitter.requested.

The current outstanding request amount.

This method it thread-safe.

Returns:long

the current outstanding request amount

Annotations
@Override
setCancellationback to summary
public final void setCancellation(Cancellable c)

Implements rx.Emitter.setCancellation.

Doc from rx.Emitter.setCancellation.

Sets a Cancellable on this emitter; any previous Subscription or Cancellation will be unsubscribed/cancelled.

Parameters
c:Cancellable

the cancellable resource, null is allowed

Annotations
@Override
setSubscriptionback to summary
public final void setSubscription(Subscription s)

Implements rx.Emitter.setSubscription.

Doc from rx.Emitter.setSubscription.

Sets a Subscription on this emitter; any previous Subscription or Cancellation will be unsubscribed/cancelled.

Parameters
s:Subscription

the subscription, null is allowed

Annotations
@Override
unsubscribeback to summary
public final void unsubscribe()

Implements rx.Subscription.unsubscribe.

Doc from rx.Subscription.unsubscribe.

Stops the receipt of notifications on the Subscriber that was registered when this Subscription was received.

This allows deregistering an Subscriber before it has finished receiving all events (i.e. before onCompleted is called).

Annotations
@Override
rx.internal.operators back to summary

pack-priv final Class OnSubscribeCreate.BufferEmitter<T>

extends OnSubscribeCreate.BaseEmitter<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv volatile boolean
pack-priv Throwable
pack-priv final Queue<Object>
private static final long
pack-priv final AtomicInteger
Inherited from rx.internal.operators.OnSubscribeCreate.BaseEmitter:
actualserial

Constructor Summary

AccessConstructor and Description
public
BufferEmitter(Subscriber<? super T> actual, int capacityHint)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public void
onCompleted()

Overrides rx.internal.operators.OnSubscribeCreate.BaseEmitter.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
)

Overrides rx.internal.operators.OnSubscribeCreate.BaseEmitter.onError.

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.
pack-priv void
pack-priv void
Inherited from rx.internal.operators.OnSubscribeCreate.BaseEmitter:
isUnsubscribedrequestrequestedsetCancellationsetSubscriptionunsubscribe

Field Detail

doneback to summary
pack-priv volatile boolean done
errorback to summary
pack-priv Throwable error
queueback to summary
pack-priv final Queue<Object> queue
serialVersionUIDback to summary
private static final long serialVersionUID

Hides rx.internal.operators.OnSubscribeCreate.BaseEmitter.serialVersionUID.

wipback to summary
pack-priv final AtomicInteger wip

Constructor Detail

BufferEmitterback to summary
public BufferEmitter(Subscriber<? super T> actual, int capacityHint)

Method Detail

drainback to summary
pack-priv void drain()
onCompletedback to summary
public void onCompleted()

Overrides rx.internal.operators.OnSubscribeCreate.BaseEmitter.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)

Overrides rx.internal.operators.OnSubscribeCreate.BaseEmitter.onError.

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
onRequestedback to summary
pack-priv void onRequested()

Overrides rx.internal.operators.OnSubscribeCreate.BaseEmitter.onRequested.

Annotations
@Override
onUnsubscribedback to summary
pack-priv void onUnsubscribed()

Overrides rx.internal.operators.OnSubscribeCreate.BaseEmitter.onUnsubscribed.

Annotations
@Override
rx.internal.operators back to summary

pack-priv final Class OnSubscribeCreate.DropEmitter<T>

extends OnSubscribeCreate.NoOverflowBaseEmitter<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
DropEmitter(Subscriber<? super T> actual)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
Inherited from rx.internal.operators.OnSubscribeCreate.NoOverflowBaseEmitter:
onNext

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides rx.internal.operators.OnSubscribeCreate.NoOverflowBaseEmitter.serialVersionUID.

Constructor Detail

DropEmitterback to summary
public DropEmitter(Subscriber<? super T> actual)

Method Detail

onOverflowback to summary
pack-priv void onOverflow()

Implements abstract rx.internal.operators.OnSubscribeCreate.NoOverflowBaseEmitter.onOverflow.

Annotations
@Override
rx.internal.operators back to summary

pack-priv final Class OnSubscribeCreate.ErrorEmitter<T>

extends OnSubscribeCreate.NoOverflowBaseEmitter<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private boolean
private static final long

Constructor Summary

AccessConstructor and Description
public
ErrorEmitter(Subscriber<? super T> actual)

Method Summary

Modifier and TypeMethod and Description
public void
onCompleted()

Overrides rx.internal.operators.OnSubscribeCreate.BaseEmitter.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
)

Overrides rx.internal.operators.OnSubscribeCreate.BaseEmitter.onError.

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
)

Overrides rx.internal.operators.OnSubscribeCreate.NoOverflowBaseEmitter.onNext.

Implements rx.Observer.onNext.

Provides the Observer with a new item to observe.
pack-priv void

Field Detail

doneback to summary
private boolean done
serialVersionUIDback to summary
private static final long serialVersionUID

Hides rx.internal.operators.OnSubscribeCreate.NoOverflowBaseEmitter.serialVersionUID.

Constructor Detail

ErrorEmitterback to summary
public ErrorEmitter(Subscriber<? super T> actual)

Method Detail

onCompletedback to summary
public void onCompleted()

Overrides rx.internal.operators.OnSubscribeCreate.BaseEmitter.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)

Overrides rx.internal.operators.OnSubscribeCreate.BaseEmitter.onError.

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)

Overrides rx.internal.operators.OnSubscribeCreate.NoOverflowBaseEmitter.onNext.

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
onOverflowback to summary
pack-priv void onOverflow()

Implements abstract rx.internal.operators.OnSubscribeCreate.NoOverflowBaseEmitter.onOverflow.

Annotations
@Override
rx.internal.operators back to summary

pack-priv final Class OnSubscribeCreate.LatestEmitter<T>

extends OnSubscribeCreate.BaseEmitter<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv volatile boolean
pack-priv Throwable
pack-priv final AtomicReference<Object>
private static final long
pack-priv final AtomicInteger
Inherited from rx.internal.operators.OnSubscribeCreate.BaseEmitter:
actualserial

Constructor Summary

AccessConstructor and Description
public
LatestEmitter(Subscriber<? super T> actual)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public void
onCompleted()

Overrides rx.internal.operators.OnSubscribeCreate.BaseEmitter.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
)

Overrides rx.internal.operators.OnSubscribeCreate.BaseEmitter.onError.

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.
pack-priv void
pack-priv void
Inherited from rx.internal.operators.OnSubscribeCreate.BaseEmitter:
isUnsubscribedrequestrequestedsetCancellationsetSubscriptionunsubscribe

Field Detail

doneback to summary
pack-priv volatile boolean done
errorback to summary
pack-priv Throwable error
queueback to summary
pack-priv final AtomicReference<Object> queue
serialVersionUIDback to summary
private static final long serialVersionUID

Hides rx.internal.operators.OnSubscribeCreate.BaseEmitter.serialVersionUID.

wipback to summary
pack-priv final AtomicInteger wip

Constructor Detail

LatestEmitterback to summary
public LatestEmitter(Subscriber<? super T> actual)

Method Detail

drainback to summary
pack-priv void drain()
onCompletedback to summary
public void onCompleted()

Overrides rx.internal.operators.OnSubscribeCreate.BaseEmitter.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)

Overrides rx.internal.operators.OnSubscribeCreate.BaseEmitter.onError.

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
onRequestedback to summary
pack-priv void onRequested()

Overrides rx.internal.operators.OnSubscribeCreate.BaseEmitter.onRequested.

Annotations
@Override
onUnsubscribedback to summary
pack-priv void onUnsubscribed()

Overrides rx.internal.operators.OnSubscribeCreate.BaseEmitter.onUnsubscribed.

Annotations
@Override
rx.internal.operators back to summary

pack-priv final Class OnSubscribeCreate.NoneEmitter<T>

extends OnSubscribeCreate.BaseEmitter<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from rx.internal.operators.OnSubscribeCreate.BaseEmitter:
actualserial

Constructor Summary

AccessConstructor and Description
public
NoneEmitter(Subscriber<? super T> actual)

Method Summary

Modifier and TypeMethod and Description
public void
onNext(T
the item emitted by the Observable
t
)

Implements rx.Observer.onNext.

Provides the Observer with a new item to observe.
Inherited from rx.internal.operators.OnSubscribeCreate.BaseEmitter:
isUnsubscribedonCompletedonErroronRequestedonUnsubscribedrequestrequestedsetCancellationsetSubscriptionunsubscribe

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides rx.internal.operators.OnSubscribeCreate.BaseEmitter.serialVersionUID.

Constructor Detail

NoneEmitterback to summary
public NoneEmitter(Subscriber<? super T> actual)

Method Detail

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
rx.internal.operators back to summary

pack-priv abstract Class OnSubscribeCreate.NoOverflowBaseEmitter<T>

extends OnSubscribeCreate.BaseEmitter<T>
Class Inheritance
Known Direct Subclasses
rx.internal.operators.OnSubscribeCreate.DropEmitter, rx.internal.operators.OnSubscribeCreate.ErrorEmitter

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from rx.internal.operators.OnSubscribeCreate.BaseEmitter:
actualserial

Constructor Summary

AccessConstructor and Description
public
NoOverflowBaseEmitter(Subscriber<? super T> actual)

Method Summary

Modifier and TypeMethod and Description
public void
onNext(T
the item emitted by the Observable
t
)

Implements rx.Observer.onNext.

Provides the Observer with a new item to observe.
pack-priv abstract void
Inherited from rx.internal.operators.OnSubscribeCreate.BaseEmitter:
isUnsubscribedonCompletedonErroronRequestedonUnsubscribedrequestrequestedsetCancellationsetSubscriptionunsubscribe

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides rx.internal.operators.OnSubscribeCreate.BaseEmitter.serialVersionUID.

Constructor Detail

NoOverflowBaseEmitterback to summary
public NoOverflowBaseEmitter(Subscriber<? super T> actual)

Method Detail

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
onOverflowback to summary
pack-priv abstract void onOverflow()