def fromNotifier(handler): return AnonymousObserver( lambda x: handler(Notification.createOnNext(x)), lambda ex: handler(Notification.createOnError(ex)), lambda: handler(Notification.createOnCompleted()) )
def onError(self, exception): self.observer.onNext(Notification.createOnError(exception)) self.observer.onCompleted() self.dispose()
def onCompleted(self): self.observer.onNext(Notification.createOnCompleted()) self.observer.onCompleted() self.dispose()
def onNext(self, value): self.observer.onNext(Notification.createOnNext(value))
def OnError(exception): return Notification.createOnError(exception)
def OnCompleted(): return Notification.createOnCompleted()
def OnNext(value): return Notification.createOnNext(value)