docs » cp.rx.RelaySubject
A Subject that provides new Observers with some or all of the most recently produced values upon reference.
- Constructors - API calls which return an object, typically one that offers API methods
- create
- Methods - API calls which can only be made on an object returned by a constructor
- onNext
- subscribe
| Signature | cp.rx.RelaySubject.create([n]) -> cp.rx.RelaySubject |
|---|---|
| Type | Constructor |
| Description | Creates a new ReplaySubject. |
| Parameters |
|
| Returns |
|
| Signature | cp.rx.RelaySubject:onNext(...) -> nil |
|---|---|
| Type | Method |
| Description | Pushes zero or more values to the ReplaySubject. They will be broadcasted to all Observers. |
| Parameters |
|
| Signature | cp.rx.RelaySubject:subscribe([observer | onNext[, onError[, onCompleted]]]) -> cp.rx.Reference |
| -----------------------------------------------------|---------------------------------------------------------------------------------------------------------|
| Type | Method |
| Description | Creates a new Observer and attaches it to the ReplaySubject. |
| Parameters |
- observer | onNext - Either an Observer, or a
functionto call when theReplaySubjectproduces a value. - onError - A
functionto call when theReplaySubjectterminates due to an error. - onCompleted - A
functionto call when the ReplaySubject completes normally.
- The Reference.