com.industry.rx_epl.ISubject <>
ISubject is designed to be a subclass of IObservable, as such it has all of the methods on an IObservable. It also contains methods to allow values to be injected into the IObservable:
Sends a value to all subscribers.
ISubject s := Subject.create();
ISubscription sub := s.subscribe(...); // Receives "abc" when .next(...) is called
s.next("abc");
Sends an error to all subscribers. Errors will terminate the subject.
ISubject s := Subject.create();
ISubscription sub := s.subscribe(...); // Receives an error and terminates the subscription
s.error(com.apama.exceptions.Exception("Oh no!", "RuntimeException"));
Sends a complete to all subscribers. Complete will terminate the subject.
ISubject s := Subject.create();
ISubscription sub := s.subscribe(...); // Receives complete and terminates the subscription
s.complete();
# .asIObservable() returns IObservable<T> <>
Converts a subject to an IObservable.
ISubject s := Subject.create();
IObservable o := s.asIObservable();