Package io.vertx.rx.java
Class WriteStreamSubscriber<R>
- java.lang.Object
-
- rx.Subscriber<R>
-
- io.vertx.rx.java.WriteStreamSubscriber<R>
-
- All Implemented Interfaces:
Observer<R>
,Subscription
public abstract class WriteStreamSubscriber<R> extends Subscriber<R>
AWriteStream
toSubscriber
adapter.- Author:
- Thomas Segismont
-
-
Constructor Summary
Constructors Constructor Description WriteStreamSubscriber()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract WriteStreamSubscriber<R>
onError(Action1<Throwable> handler)
Sets the handler to invoke if theObservable
that was subscribed to terminates with an error.abstract WriteStreamSubscriber<R>
onWriteStreamEnd(Action0 handler)
Sets the handler to invoke when the adaptedWriteStream
ends successfully.abstract WriteStreamSubscriber<R>
onWriteStreamEndError(Action1<Throwable> handler)
Sets the handler to invoke when the adaptedWriteStream
ends with an error.abstract WriteStreamSubscriber<R>
onWriteStreamError(Action1<Throwable> handler)
Sets the handler to invoke if the adaptedWriteStream
fails.-
Methods inherited from class rx.Subscriber
add, isUnsubscribed, onStart, request, setProducer, unsubscribe
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface rx.Observer
onCompleted, onError, onNext
-
-
-
-
Method Detail
-
onError
public abstract WriteStreamSubscriber<R> onError(Action1<Throwable> handler)
Sets the handler to invoke if theObservable
that 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
public abstract WriteStreamSubscriber<R> onWriteStreamError(Action1<Throwable> handler)
Sets the handler to invoke if the adaptedWriteStream
fails.The underlying
WriteStream.end()
method is not invoked in this case.- Returns:
- a reference to this, so the API can be used fluently
-
onWriteStreamEnd
public abstract WriteStreamSubscriber<R> onWriteStreamEnd(Action0 handler)
Sets the handler to invoke when the adaptedWriteStream
ends successfully.- Returns:
- a reference to this, so the API can be used fluently
-
onWriteStreamEndError
public abstract WriteStreamSubscriber<R> onWriteStreamEndError(Action1<Throwable> handler)
Sets the handler to invoke when the adaptedWriteStream
ends with an error.- Returns:
- a reference to this, so the API can be used fluently
-
-