public interface Stateful<S extends Enum>
A stateful component that changes its state and notifies subscribed parties.
Modifier and Type | Method and Description |
---|---|
boolean |
hasSubscribers()
Returns true if there are subscribers observing the state stream.
|
boolean |
isState(S state)
Check if the given state is the same as the current one.
|
S |
state()
Returns the current state.
|
rx.Observable<S> |
states()
Returns a infinite observable which gets updated when the state of the component changes.
|
rx.Observable<S> states()
Returns a infinite observable which gets updated when the state of the component changes.
Observable
updated with state transitions.S state()
Returns the current state.
boolean isState(S state)
Check if the given state is the same as the current one.
state
- the stats to check against.boolean hasSubscribers()
Returns true if there are subscribers observing the state stream.
Copyright © 2018 Couchbase, Inc.. All rights reserved.