Uses of Interface
rx.Subscription
Packages that use Subscription
Package
Description
Base reactive classes: Observable, Single and Completable; base reactive consumers;
other common base interfaces.
Operators that allow composing Observables to transform and
manipulate data in an asynchronous, functional and thread-safe manner.
Classes extending the Observable base reactive class, synchronous and
asynchronous event generators.
Default wrappers and implementations for the base reactive consumer classes and interfaces;
utility classes for creating them from callbacks.
Callback types and a central plugin handler class to hook into the lifecycle
of the base reactive types and schedulers.
Scheduler implementations, value+time record classes and the standard factory class to
return standard RxJava schedulers or wrap any Executor-based (thread pool) instances.
Classes extending the Observable base reactive class and implementing
the Observer interface at the same time (aka hot Observables).
Default implementations for Subscription-based resource management
(Subscription container types) and utility classes to construct
Subscriptions from callbacks and other types.
-
Uses of Subscription in rx
Classes in rx that implement SubscriptionModifier and TypeClassDescriptionstatic class
Sequential Scheduler for executing actions on a single thread or event loop.class
Provides a mechanism for receiving push-based notifications.class
Subscriber<T>
Provides a mechanism for receiving push-based notifications from Observables, and permits manual unsubscribing from these Observables.Methods in rx with type parameters of type SubscriptionModifier and TypeMethodDescription<S extends Scheduler & Subscription>
SScheduler.when
(Func1<Observable<Observable<Completable>>, Completable> combine) Allows the use of operators for controlling the timing around when actions scheduled on workers are actually done.Methods in rx that return SubscriptionModifier and TypeMethodDescriptionabstract Subscription
Schedules an Action for execution.abstract Subscription
Schedules an Action for execution at some point in the future.Scheduler.Worker.schedulePeriodically
(Action0 action, long initialDelay, long period, TimeUnit unit) Schedules a cancelable action to be executed periodically.final Subscription
Completable.subscribe()
Subscribes to this Completable and returns a Subscription which can be used to cancel the subscription.final Subscription
Subscribes to this Completable and calls the given Action0 when this Completable completes normally.final Subscription
Subscribes to this Completable and calls back either the onError or onComplete functions.final Subscription
Observable.subscribe()
Subscribes to an Observable and ignoresonNext
andonCompleted
emissions.final Subscription
Subscribes to an Observable and provides a callback to handle the items it emits.final Subscription
Subscribes to an Observable and provides callbacks to handle the items it emits and any error notification it issues.final Subscription
Subscribes to an Observable and provides callbacks to handle the items it emits and any error or completion notification it issues.final Subscription
Subscribes to an Observable and provides an Observer that implements functions to handle the items the Observable emits and any error or completion notification it issues.final Subscription
Observable.subscribe
(Subscriber<? super T> subscriber) Subscribes to an Observable and provides a Subscriber that implements functions to handle the items the Observable emits and any error or completion notification it issues.(package private) static <T> Subscription
Observable.subscribe
(Subscriber<? super T> subscriber, Observable<T> observable) final Subscription
Single.subscribe()
Subscribes to a Single but ignore its emission or notification.final Subscription
Subscribes to a Single and provides a callback to handle the item it emits.final Subscription
Subscribes to a Single and provides callbacks to handle the item it emits or any error notification it issues.final Subscription
Subscribes an Observer to this single and returns a Subscription that allows unsubscription.final Subscription
Single.subscribe
(SingleSubscriber<? super T> te) Subscribes to a Single and provides aSingleSubscriber
that implements functions to handle the item the Single emits or any error notification it issues.final Subscription
Single.subscribe
(Subscriber<? super T> subscriber) Subscribes to a Single and provides a Subscriber that implements functions to handle the item the Single emits or any error notification it issues.final Subscription
Observable.unsafeSubscribe
(Subscriber<? super T> subscriber) Subscribes to an Observable and invokesObservable.OnSubscribe
function without any contract protection, error handling, unsubscribe, or execution hooks.final Subscription
Single.unsafeSubscribe
(Subscriber<? super T> subscriber) Subscribes to a Single and invokes theSingle.OnSubscribe
function without any contract protection, error handling, unsubscribe, or execution hooks.Methods in rx with parameters of type SubscriptionModifier and TypeMethodDescriptionfinal void
SingleSubscriber.add
(Subscription s) Adds aSubscription
to this Subscriber's list of subscriptions if this list is not marked as unsubscribed.final void
Subscriber.add
(Subscription s) Adds aSubscription
to this Subscriber's list of subscriptions if this list is not marked as unsubscribed.void
Completable.CompletableSubscriber.onSubscribe
(Subscription d) Called once by the Completable to set a Subscription on this instance which then can be used to cancel the subscription at any time.void
AsyncEmitter.setSubscription
(Subscription s) Sets a Subscription on this emitter; any previous Subscription or Cancellation will be unsubscribed/cancelled.Method parameters in rx with type arguments of type SubscriptionModifier and TypeMethodDescriptionprotected final Completable
Completable.doOnLifecycle
(Action1<? super Subscription> onSubscribe, Action1<? super Throwable> onError, Action0 onComplete, Action0 onAfterComplete, Action0 onUnsubscribe) Returns a Completable instance that calls the various callbacks on the specific lifecycle events.final Completable
Completable.doOnSubscribe
(Action1<? super Subscription> onSubscribe) Returns a Completable instance that calls the given onSubscribe callback with the disposable that child subscribers receive on subscription. -
Uses of Subscription in rx.internal.operators
Classes in rx.internal.operators that implement SubscriptionModifier and TypeClassDescription(package private) static final class
Observer of source, iterator for output.(package private) static final class
(package private) static final class
static final class
(package private) static final class
Keeps track of the current request amount and the replay position for a child Subscriber.(package private) static final class
(package private) static final class
class
Base class for Subscribers that consume the entire upstream and signal zero or one element (or an error) in a backpressure honoring fashion.(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
Callbacks from the child Subscriber.(package private) static final class
The parent subscriber that forwards events and cleans up on a terminal state.(package private) static final class
(package private) static final class
(package private) static class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static class
(package private) final class
Manages sub-observers and subscriptions.(package private) final class
Observe left duration and apply termination.(package private) final class
Observe the left source.(package private) final class
Observe right duration and apply termination.(package private) final class
Observe the right source.(package private) final class
Observe activities on the window.(package private) final class
Observes the left values.(package private) final class
Observes the left duration.(package private) final class
Observes the right values.(package private) final class
Observe the right duration.(package private) static final class
(package private) static final class
(package private) static final class
final class
Multicasts notifications coming through its input Subscriber view to its client Subscribers via lockstep backpressure mode.(package private) static final class
The subscriber that must be used for subscribing to the upstream source.(package private) static final class
A Producer and Subscription that wraps a child Subscriber and manages its backpressure requests along with its unsubscription from the parent class.(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
OnSubscribeUsing.DisposeAction<Resource>
(package private) final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) final class
(package private) final class
Subscriber when exact timed chunking is required.(package private) final class
Subscriber when the buffer chunking time and length differ.(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static class
(package private) static final class
(package private) static final class
The subscriber that observes Observables.(package private) static final class
Observe through individual queue per observer.(package private) static final class
(package private) static final class
A terminable producer which emits the latest items on request.(package private) static final class
(package private) static final class
A Producer and Subscription that manages the request and unsubscription state of a child subscriber in thread-safe manner.(package private) static final class
(package private) static final class
A Producer and Subscription that manages the request and unsubscription state of a child subscriber in thread-safe manner.(package private) static final class
(package private) static final class
(package private) static final class
The source subscriber and sampler.(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
Subscribed to source and scheduled on a worker.(package private) final class
Subscriber returned to the upstream.(package private) static final class
(package private) static final class
Observes the boundary.(package private) static final class
Observes the source.(package private) static final class
Observes the boundary.(package private) static final class
Observes the source.(package private) static final class
(package private) static final class
(package private) static final class
(package private) final class
(package private) final class
Subscriber with exact, non-overlapping windows.(package private) final class
Subscriber with inexact, potentially overlapping or discontinuous windows.(package private) static final class
(package private) static final class
(package private) final class
(package private) final class
(package private) static final class
(package private) static final class
Fields in rx.internal.operators declared as SubscriptionModifier and TypeFieldDescription(package private) final Subscription
OperatorWindowWithSize.WindowExact.cancel
(package private) final Subscription
OperatorWindowWithSize.WindowOverlap.cancel
(package private) final Subscription
OperatorWindowWithSize.WindowSkip.cancel
(package private) Subscription
OperatorMulticast.guardedSubscription
private final Subscription
OnSubscribeGroupJoin.WindowObservableFunc.WindowSubscriber.ref
Fields in rx.internal.operators with type parameters of type SubscriptionModifier and TypeFieldDescription(package private) final Action1
<? super Subscription> OnSubscribeAutoConnect.connection
Methods in rx.internal.operators that return SubscriptionModifier and TypeMethodDescriptionprivate Subscription
OnSubscribeRefCount.disconnect
(CompositeSubscription current) Methods in rx.internal.operators that return types with arguments of type SubscriptionModifier and TypeMethodDescriptionprivate Action1
<Subscription> OnSubscribeRefCount.onSubscribe
(Subscriber<? super T> subscriber, AtomicBoolean writeLocked) Methods in rx.internal.operators with parameters of type SubscriptionModifier and TypeMethodDescriptionprotected void
OnSubscribeJoin.ResultSink.LeftSubscriber.expire
(int id, Subscription resource) (package private) void
OnSubscribeJoin.ResultSink.RightSubscriber.expire
(int id, Subscription resource) void
CompletableOnSubscribeConcat.CompletableConcatSubscriber.ConcatInnerSubscriber.onSubscribe
(Subscription d) void
CompletableOnSubscribeConcatArray.ConcatInnerSubscriber.onSubscribe
(Subscription d) void
CompletableOnSubscribeConcatIterable.ConcatInnerSubscriber.onSubscribe
(Subscription d) void
OnSubscribeOnAssemblyCompletable.OnAssemblyCompletableSubscriber.onSubscribe
(Subscription d) final void
OnSubscribeFromAsync.BaseAsyncEmitter.setSubscription
(Subscription s) Method parameters in rx.internal.operators with type arguments of type SubscriptionModifier and TypeMethodDescriptionvoid
OperatorMulticast.connect
(Action1<? super Subscription> connection) void
OperatorPublish.connect
(Action1<? super Subscription> connection) void
OperatorReplay.connect
(Action1<? super Subscription> connection) Constructors in rx.internal.operators with parameters of type SubscriptionModifierConstructorDescriptionWindowSubscriber
(Subscriber<? super T> subscriber, Subscription ref) Constructor parameters in rx.internal.operators with type arguments of type SubscriptionModifierConstructorDescriptionOnSubscribeAutoConnect
(ConnectableObservable<? extends T> source, int numberOfSubscribers, Action1<? super Subscription> connection) -
Uses of Subscription in rx.internal.schedulers
Classes in rx.internal.schedulers that implement SubscriptionModifier and TypeClassDescription(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
Worker that schedules tasks on the executor indirectly through a trampoline mechanism.private class
class
final class
ARunnable
that executes anAction0
and can be cancelled.(package private) final class
Cancels the captured future if the caller of the call method is not the same as the runner of the outer ScheduledAction to prevent unnecessary self-interrupting if the unsubscription happens from the same thread.(package private) static final class
Remove a child subscription from a composite when unsubscribing.(package private) static final class
Remove a child subscription from a composite when unsubscribing.class
Allows the use of operators for controlling the timing around when actions scheduled on workers are actually done.private static class
private static class
private static class
(package private) static final class
Fields in rx.internal.schedulers declared as SubscriptionModifier and TypeFieldDescriptionprivate static final Subscription
SchedulerWhen.SUBSCRIBED
private final Subscription
SchedulerWhen.subscription
private static final Subscription
SchedulerWhen.UNSUBSCRIBED
Methods in rx.internal.schedulers that return SubscriptionModifier and TypeMethodDescriptionprotected Subscription
SchedulerWhen.DelayedAction.callActual
(Scheduler.Worker actualWorker) protected Subscription
SchedulerWhen.ImmediateAction.callActual
(Scheduler.Worker actualWorker) protected abstract Subscription
SchedulerWhen.ScheduledAction.callActual
(Scheduler.Worker actualWorker) private Subscription
TrampolineScheduler.InnerCurrentThreadScheduler.schedule
(Action0 action, long delayTime, TimeUnit unit) EventLoopsScheduler.scheduleDirect
(Action0 action) Schedules the action directly on one of the event loop workers without the additional infrastructure and checking.Methods in rx.internal.schedulers with parameters of type SubscriptionModifier and TypeMethodDescriptionvoid
ScheduledAction.add
(Subscription s) Adds a general Subscription to thisScheduledAction
that will be unsubscribed if the underlyingaction
completes or the this scheduled action is cancelled. -
Uses of Subscription in rx.internal.util
Classes in rx.internal.util that implement SubscriptionModifier and TypeClassDescriptionfinal class
A Subscriber that forwards the onXXX method calls to callbacks.final class
Add/Remove without object allocation (after initial construction).final class
Wraps an Observer and forwards the onXXX method calls to it.class
This assumes Spsc or Spmc usage.final class
Subscription that represents a group of Subscriptions that are unsubscribed together.Fields in rx.internal.util with type parameters of type SubscriptionModifier and TypeFieldDescription(package private) final Func1
<Action0, Subscription> ScalarSynchronousObservable.ScalarAsyncOnSubscribe.onSchedule
(package private) final Func1
<Action0, Subscription> ScalarSynchronousObservable.ScalarAsyncProducer.onSchedule
private List
<Subscription> SubscriptionList.subscriptions
Methods in rx.internal.util with parameters of type SubscriptionModifier and TypeMethodDescriptionvoid
SubscriptionList.add
(Subscription s) static void
BlockingUtils.awaitForComplete
(CountDownLatch latch, Subscription subscription) Blocks and waits for aSubscription
to complete.void
SubscriptionList.remove
(Subscription s) Method parameters in rx.internal.util with type arguments of type SubscriptionModifier and TypeMethodDescriptionprivate static void
SubscriptionList.unsubscribeFromAll
(Collection<Subscription> subscriptions) Constructors in rx.internal.util with parameters of type SubscriptionModifierConstructorDescriptionConstructs a SubscriptionList with the given initial child subscription.SubscriptionList
(Subscription... subscriptions) Constructs a SubscriptionList with the given initial child subscriptions.Constructor parameters in rx.internal.util with type arguments of type SubscriptionModifierConstructorDescription(package private)
ScalarAsyncOnSubscribe
(T value, Func1<Action0, Subscription> onSchedule) ScalarAsyncProducer
(Subscriber<? super T> actual, T value, Func1<Action0, Subscription> onSchedule) -
Uses of Subscription in rx.observables
Classes in rx.observables that implement SubscriptionModifier and TypeClassDescription(package private) static final class
(package private) static final class
Contains the producer loop that reacts to downstream requests of work.Methods in rx.observables that return SubscriptionModifier and TypeMethodDescriptionfinal Subscription
ConnectableObservable.connect()
Instructs theConnectableObservable
to begin emitting the items from its underlyingObservable
to itsSubscriber
s.Method parameters in rx.observables with type arguments of type SubscriptionModifier and TypeMethodDescriptionConnectableObservable.autoConnect
(int numberOfSubscribers, Action1<? super Subscription> connection) Returns an Observable that automatically connects to this ConnectableObservable when the specified number of Subscribers subscribe to it and calls the specified callback with the Subscription associated with the established connection.abstract void
ConnectableObservable.connect
(Action1<? super Subscription> connection) Instructs theConnectableObservable
to begin emitting the items from its underlyingObservable
to itsSubscriber
s. -
Uses of Subscription in rx.observers
Classes in rx.observers that implement SubscriptionModifier and TypeClassDescriptionclass
An abstract base class for CompletableSubscriber implementations that want to expose an unsubscription capability.(package private) static final class
final class
Wraps another CompletableSubscriber and handles exceptions thrown from onError and onCompleted.class
SafeSubscriber
is a wrapper aroundSubscriber
that ensures that theSubscriber
complies with the Observable contract.class
Enforces single-threaded, serialized, ordered execution ofSerializedSubscriber.onNext(T)
,SerializedSubscriber.onCompleted()
, andSerializedSubscriber.onError(java.lang.Throwable)
.class
ATestSubscriber
is a variety ofSubscriber
that you can use for unit testing, to perform assertions, inspect received events, or wrap a mockedSubscriber
.Fields in rx.observers declared as SubscriptionFields in rx.observers with type parameters of type SubscriptionModifier and TypeFieldDescriptionprivate final AtomicReference
<Subscription> AsyncCompletableSubscriber.upstream
Holds onto a deferred subscription and allows asynchronous cancellation before the call to onSubscribe() by the upstream.Methods in rx.observers with parameters of type SubscriptionModifier and TypeMethodDescriptionfinal void
AsyncCompletableSubscriber.onSubscribe
(Subscription d) void
SafeCompletableSubscriber.onSubscribe
(Subscription d) -
Uses of Subscription in rx.plugins
Fields in rx.plugins with type parameters of type SubscriptionModifier and TypeFieldDescription(package private) static Func1
<Subscription, Subscription> RxJavaHooks.onObservableReturn
(package private) static Func1
<Subscription, Subscription> RxJavaHooks.onObservableReturn
(package private) static Func1
<Subscription, Subscription> RxJavaHooks.onSingleReturn
(package private) static Func1
<Subscription, Subscription> RxJavaHooks.onSingleReturn
Methods in rx.plugins that return SubscriptionModifier and TypeMethodDescriptionstatic Subscription
RxJavaHooks.onObservableReturn
(Subscription subscription) Hook to call before the Observable.subscribe() method is about to return a Subscription.static Subscription
RxJavaHooks.onSingleReturn
(Subscription subscription) Hook to call before the Single.subscribe() method is about to return a Subscription.<T> Subscription
RxJavaObservableExecutionHook.onSubscribeReturn
(Subscription subscription) Deprecated.<T> Subscription
RxJavaSingleExecutionHook.onSubscribeReturn
(Subscription subscription) Deprecated.Methods in rx.plugins that return types with arguments of type SubscriptionModifier and TypeMethodDescriptionstatic Func1
<Subscription, Subscription> RxJavaHooks.getOnObservableReturn()
Returns the current Observable onReturn hook function or null if it is set to the default pass-through.static Func1
<Subscription, Subscription> RxJavaHooks.getOnObservableReturn()
Returns the current Observable onReturn hook function or null if it is set to the default pass-through.static Func1
<Subscription, Subscription> RxJavaHooks.getOnSingleReturn()
Returns the current Single onReturn hook function or null if it is set to the default pass-through.static Func1
<Subscription, Subscription> RxJavaHooks.getOnSingleReturn()
Returns the current Single onReturn hook function or null if it is set to the default pass-through.Methods in rx.plugins with parameters of type SubscriptionModifier and TypeMethodDescriptionstatic Subscription
RxJavaHooks.onObservableReturn
(Subscription subscription) Hook to call before the Observable.subscribe() method is about to return a Subscription.static Subscription
RxJavaHooks.onSingleReturn
(Subscription subscription) Hook to call before the Single.subscribe() method is about to return a Subscription.<T> Subscription
RxJavaObservableExecutionHook.onSubscribeReturn
(Subscription subscription) Deprecated.<T> Subscription
RxJavaSingleExecutionHook.onSubscribeReturn
(Subscription subscription) Deprecated.Method parameters in rx.plugins with type arguments of type SubscriptionModifier and TypeMethodDescriptionstatic void
RxJavaHooks.setOnObservableReturn
(Func1<Subscription, Subscription> onObservableReturn) Sets a hook function that is called when the Observable.subscribe() call is about to return a Subscription unless a lockdown is in effect.static void
RxJavaHooks.setOnObservableReturn
(Func1<Subscription, Subscription> onObservableReturn) Sets a hook function that is called when the Observable.subscribe() call is about to return a Subscription unless a lockdown is in effect.static void
RxJavaHooks.setOnSingleReturn
(Func1<Subscription, Subscription> onSingleReturn) Sets a hook function that is called when the Single.subscribe() call is about to return a Subscription unless a lockdown is in effect.static void
RxJavaHooks.setOnSingleReturn
(Func1<Subscription, Subscription> onSingleReturn) Sets a hook function that is called when the Single.subscribe() call is about to return a Subscription unless a lockdown is in effect. -
Uses of Subscription in rx.schedulers
Classes in rx.schedulers that implement SubscriptionMethods in rx.schedulers that return SubscriptionModifier and TypeMethodDescription -
Uses of Subscription in rx.subjects
Classes in rx.subjects that implement SubscriptionModifier and TypeClassDescription(package private) static final class
A producer and subscription implementation that tracks the current replay position of a particular subscriber.(package private) static final class
The single-consumption replaying state. -
Uses of Subscription in rx.subscriptions
Classes in rx.subscriptions that implement SubscriptionModifier and TypeClassDescriptionfinal class
Subscription that can be checked for status such as in a loop inside anObservable
to exit the loop if unsubscribed.final class
Subscription that represents a group of Subscriptions that are unsubscribed together.final class
Subscription that can be checked for status such as in a loop inside anObservable
to exit the loop if unsubscribed.final class
Keeps track of the sub-subscriptions and unsubscribes the underlying subscription once all sub-subscriptions have unsubscribed.(package private) static final class
The individual sub-subscriptions.final class
Represents a subscription whose underlying subscription can be swapped for another subscription which causes the previous underlying subscription to be unsubscribed.(package private) static final class
Naming classes helps with debugging.(package private) static final class
Naming classes helps with debugging.Fields in rx.subscriptions declared as SubscriptionModifier and TypeFieldDescriptionprivate final Subscription
RefCountSubscription.actual
(package private) final Subscription
MultipleAssignmentSubscription.State.subscription
(package private) final Subscription
SerialSubscription.State.subscription
Fields in rx.subscriptions with type parameters of type SubscriptionMethods in rx.subscriptions that return SubscriptionModifier and TypeMethodDescriptionstatic Subscription
Creates and returns aSubscription
that invokes the givenAction0
when unsubscribed.static Subscription
Subscriptions.empty()
static Subscription
Converts aFuture
into aSubscription
and cancels it when unsubscribed.MultipleAssignmentSubscription.get()
Gets the underlying subscription.RefCountSubscription.get()
Returns a new sub-subscriptionSerialSubscription.get()
Retrieves the currentSubscription
that is being represented by thisSerialSubscription
.static Subscription
Subscriptions.unsubscribed()
Returns aSubscription
to whichunsubscribe
does nothing, as it is already unsubscribed.Methods in rx.subscriptions with parameters of type SubscriptionModifier and TypeMethodDescriptionvoid
CompositeSubscription.add
(Subscription s) Adds a newSubscription
to thisCompositeSubscription
if theCompositeSubscription
is not yet unsubscribed.void
CompositeSubscription.addAll
(Subscription... subscriptions) Adds collection ofSubscription
to thisCompositeSubscription
if theCompositeSubscription
is not yet unsubscribed.static CompositeSubscription
Subscriptions.from
(Subscription... subscriptions) Converts a set ofSubscription
s into aCompositeSubscription
that groups the multiple Subscriptions together and unsubscribes from all of them together.void
CompositeSubscription.remove
(Subscription s) void
MultipleAssignmentSubscription.set
(Subscription s) Sets the underlying subscription.(package private) MultipleAssignmentSubscription.State
MultipleAssignmentSubscription.State.set
(Subscription s) void
SerialSubscription.set
(Subscription s) Swaps out the oldSubscription
for the specifiedSubscription
.(package private) SerialSubscription.State
SerialSubscription.State.set
(Subscription s) Method parameters in rx.subscriptions with type arguments of type SubscriptionModifier and TypeMethodDescriptionprivate static void
CompositeSubscription.unsubscribeFromAll
(Collection<Subscription> subscriptions) Constructors in rx.subscriptions with parameters of type SubscriptionModifierConstructorDescriptionCompositeSubscription
(Subscription... subscriptions) Creates aRefCountSubscription
by wrapping the given non-nullSubscription
.(package private)
State
(boolean u, Subscription s) (package private)
State
(boolean u, Subscription s)