Package io.reactivex.rxjava3.subjects
Class PublishSubject.PublishDisposable<T>
java.lang.Object
java.util.concurrent.atomic.AtomicBoolean
io.reactivex.rxjava3.subjects.PublishSubject.PublishDisposable<T>
- Type Parameters:
T
- the value type
- All Implemented Interfaces:
Disposable
,Serializable
- Enclosing class:
PublishSubject<T>
Wraps the actual subscriber, tracks its requests and makes cancellation
to remove itself from the current subscribers array.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe actual subscriber.(package private) final PublishSubject
<T> The subject state.private static final long
-
Constructor Summary
ConstructorsConstructorDescriptionPublishDisposable
(Observer<? super T> actual, PublishSubject<T> parent) Constructs a PublishSubscriber, wraps the actual subscriber and the state. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Dispose the resource, the operation should be idempotent.boolean
Returns true if this resource has been disposed.void
void
void
Methods inherited from class java.util.concurrent.atomic.AtomicBoolean
compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, get, getAcquire, getAndSet, getOpaque, getPlain, lazySet, set, setOpaque, setPlain, setRelease, toString, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
downstream
The actual subscriber. -
parent
The subject state.
-
-
Constructor Details
-
PublishDisposable
PublishDisposable(Observer<? super T> actual, PublishSubject<T> parent) Constructs a PublishSubscriber, wraps the actual subscriber and the state.- Parameters:
actual
- the actual subscriberparent
- the parent PublishProcessor
-
-
Method Details
-
onNext
-
onError
-
onComplete
public void onComplete() -
dispose
public void dispose()Description copied from interface:Disposable
Dispose the resource, the operation should be idempotent.- Specified by:
dispose
in interfaceDisposable
-
isDisposed
public boolean isDisposed()Description copied from interface:Disposable
Returns true if this resource has been disposed.- Specified by:
isDisposed
in interfaceDisposable
- Returns:
- true if this resource has been disposed
-