Interface WriteStreamObserver<R>
- All Superinterfaces:
Observer<R>
A
WriteStream to Observer adapter.- Author:
- Thomas Segismont
-
Method Summary
Modifier and TypeMethodDescriptionSets the handler to invoke if theObservablethat was subscribed to terminates with an error.onWriteStreamEnd(Action handler) Sets the handler to invoke when the adaptedWriteStreamends successfully.onWriteStreamEndError(Consumer<? super Throwable> handler) Sets the handler to invoke when the adaptedWriteStreamends with an error.onWriteStreamError(Consumer<? super Throwable> handler) Sets the handler to invoke if the adaptedWriteStreamfails.Methods inherited from interface Observer
onComplete, onError, onNext, onSubscribe
-
Method Details
-
onError
Sets the handler to invoke if theObservablethat was subscribed to terminates with an error.The underlying
WriteStream.end()method is not invoked in this case.- Returns:
- a reference to this, so the API can be used fluently
-
onWriteStreamError
Sets the handler to invoke if the adaptedWriteStreamfails.The underlying
WriteStream.end()method is not invoked in this case.- Returns:
- a reference to this, so the API can be used fluently
-
onWriteStreamEnd
Sets the handler to invoke when the adaptedWriteStreamends successfully.- Returns:
- a reference to this, so the API can be used fluently
-
onWriteStreamEndError
Sets the handler to invoke when the adaptedWriteStreamends with an error.- Returns:
- a reference to this, so the API can be used fluently
-