public abstract class AbstractListenerWriteFlushProcessor<T>
extends java.lang.Object
implements org.reactivestreams.Processor<org.reactivestreams.Publisher<? extends T>,java.lang.Void>
AbstractListenerWriteProcessor but instead writing
a Publisher<Publisher<T>> with flush boundaries enforces after
the completion of each nested Publisher.| Constructor and Description |
|---|
AbstractListenerWriteFlushProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cancel()
Listeners can call this method to cancel further writing.
|
protected abstract org.reactivestreams.Processor<? super T,java.lang.Void> |
createWriteProcessor()
Create a new processor for subscribing to the next flush boundary.
|
protected abstract void |
flush()
Flush the output.
|
protected void |
flushingFailed(java.lang.Throwable t)
Invoked when an error happens while flushing.
|
protected abstract boolean |
isFlushPending()
Whether flushing is pending.
|
protected abstract boolean |
isWritePossible()
Whether writing is possible.
|
void |
onComplete() |
void |
onError(java.lang.Throwable t) |
protected void |
onFlushPossible()
Listeners can call this to notify when flushing is possible.
|
void |
onNext(org.reactivestreams.Publisher<? extends T> publisher) |
void |
onSubscribe(org.reactivestreams.Subscription subscription) |
void |
subscribe(org.reactivestreams.Subscriber<? super java.lang.Void> subscriber) |
protected final Log logger
public final void onSubscribe(org.reactivestreams.Subscription subscription)
onSubscribe in interface org.reactivestreams.Subscriber<org.reactivestreams.Publisher<? extends T>>public final void onNext(org.reactivestreams.Publisher<? extends T> publisher)
onNext in interface org.reactivestreams.Subscriber<org.reactivestreams.Publisher<? extends T>>public final void onError(java.lang.Throwable t)
onError in interface org.reactivestreams.Subscriber<org.reactivestreams.Publisher<? extends T>>public final void onComplete()
onComplete in interface org.reactivestreams.Subscriber<org.reactivestreams.Publisher<? extends T>>public final void subscribe(org.reactivestreams.Subscriber<? super java.lang.Void> subscriber)
subscribe in interface org.reactivestreams.Publisher<java.lang.Void>protected void cancel()
protected void flushingFailed(java.lang.Throwable t)
AsyncListener.onError(javax.servlet.AsyncEvent) event.protected abstract org.reactivestreams.Processor<? super T,java.lang.Void> createWriteProcessor()
protected abstract void flush()
throws java.io.IOException
java.io.IOExceptionprotected abstract boolean isWritePossible()
protected abstract boolean isFlushPending()
protected final void onFlushPossible()