RxJava



rx.observers
Class SynchronizedSubscriber<T>

java.lang.Object
  extended by rx.Subscriber<T>
      extended by rx.observers.SynchronizedSubscriber<T>
Type Parameters:
T -
All Implemented Interfaces:
Observer<T>, Subscription

Deprecated. Use SerializedSubscriber instead as it doesn't block threads during event notification.

@Deprecated
public final class SynchronizedSubscriber<T>
extends Subscriber<T>

A thread-safe Observer for transitioning states in operators.

Execution rules are:


Constructor Summary
SynchronizedSubscriber(Subscriber<? super T> subscriber)
          Deprecated. Used when synchronizing an Subscriber without access to the subscription.
SynchronizedSubscriber(Subscriber<? super T> subscriber, java.lang.Object lock)
          Deprecated.  
 
Method Summary
 void onCompleted()
          Deprecated. Notifies the Observer that the Observable has finished sending push-based notifications.
 void onError(java.lang.Throwable e)
          Deprecated. Notifies the Observer that the Observable has experienced an error condition.
 void onNext(T t)
          Deprecated. Provides the Observer with new data.
 
Methods inherited from class rx.Subscriber
add, isUnsubscribed, unsubscribe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynchronizedSubscriber

public SynchronizedSubscriber(Subscriber<? super T> subscriber,
                              java.lang.Object lock)
Deprecated. 

SynchronizedSubscriber

public SynchronizedSubscriber(Subscriber<? super T> subscriber)
Deprecated. 
Used when synchronizing an Subscriber without access to the subscription.

Parameters:
subscriber -
Method Detail

onCompleted

public void onCompleted()
Deprecated. 
Description copied from interface: Observer
Notifies the Observer that the Observable has finished sending push-based notifications.

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


onError

public void onError(java.lang.Throwable e)
Deprecated. 
Description copied from interface: Observer
Notifies the Observer that the Observable has experienced an error condition.

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


onNext

public void onNext(T t)
Deprecated. 
Description copied from interface: Observer
Provides the Observer with new data.

The Observable calls this closure 1 or more times, unless it calls onError in which case this closure may never be called.

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