/** * Completion signal from the upstream, write Publisher. This is also used * by sub-classes to delegate completion notifications from the container. */ @Override public final void onComplete() { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "No more items to write"); } this.state.get().onComplete(this); }
/** * Error signal from the upstream, write Publisher. This is also used by * sub-classes to delegate error notifications from the container. */ @Override public final void onError(Throwable ex) { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "Write source error: " + ex); } this.state.get().onError(this, ex); }
@Override public final void onNext(T data) { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "Item to write"); } this.state.get().onNext(this, data); }
public <T> void onComplete(AbstractListenerWriteProcessor<T> processor) { throw new IllegalStateException(toString()); }
public <T> void onComplete(AbstractListenerWriteProcessor<T> processor) { throw new IllegalStateException(toString()); }
@Override public final void onSubscribe(Subscription subscription) { this.state.get().onSubscribe(this, subscription); }
@Override public final void onSubscribe(Subscription subscription) { this.state.get().onSubscribe(this, subscription); }
@Override public <T> void onSubscribe(AbstractListenerWriteProcessor<T> processor, Subscription subscription) { Assert.notNull(subscription, "Subscription must not be null"); if (processor.changeState(this, REQUESTED)) { processor.subscription = subscription; subscription.request(1); } else { super.onSubscribe(processor, subscription); } } },
@Override public final void onNext(T data) { logger.trace("Received onNext data item"); this.state.get().onNext(this, data); }
/** * Completion signal from the upstream, write Publisher. This is also used * by sub-classes to delegate completion notifications from the container. */ @Override public final void onComplete() { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "No more items to write"); } this.state.get().onComplete(this); }
@Override public final void onNext(T data) { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "Item to write"); } this.state.get().onNext(this, data); }
@Override public <T> void onSubscribe(AbstractListenerWriteProcessor<T> processor, Subscription subscription) { Assert.notNull(subscription, "Subscription must not be null"); if (processor.changeState(this, REQUESTED)) { processor.subscription = subscription; subscription.request(1); } else { super.onSubscribe(processor, subscription); } } },
/** * Error signal from the upstream, write Publisher. This is also used by * sub-classes to delegate error notifications from the container. */ @Override public final void onError(Throwable ex) { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "Write source error: " + ex); } this.state.get().onError(this, ex); }
public <T> void onError(AbstractListenerWriteProcessor<T> processor, Throwable ex) { if (processor.changeState(this, COMPLETED)) { processor.discardCurrentData(); processor.writingComplete(); processor.resultPublisher.publishError(ex); } else { processor.state.get().onError(processor, ex); } }
private void changeStateToComplete(State oldState) { if (changeState(oldState, State.COMPLETED)) { discardCurrentData(); writingComplete(); this.resultPublisher.publishComplete(); } else { this.state.get().onComplete(this); } }
/** * Invoked when writing is possible, either in the same thread after a check * via {@link #isWritePossible()}, or as a callback from the underlying * container. */ public final void onWritePossible() { if (rsWriteLogger.isTraceEnabled()) { rsWriteLogger.trace(getLogPrefix() + "onWritePossible"); } this.state.get().onWritePossible(this); }
public <T> void onComplete(AbstractListenerWriteProcessor<T> processor) { throw new IllegalStateException(toString()); }
@Override public final void onSubscribe(Subscription subscription) { this.state.get().onSubscribe(this, subscription); }
public <T> void onError(AbstractListenerWriteProcessor<T> processor, Throwable ex) { if (processor.changeState(this, COMPLETED)) { processor.discardCurrentData(); processor.writingComplete(); processor.resultPublisher.publishError(ex); } else { processor.state.get().onError(processor, ex); } }
private void changeStateToComplete(State oldState) { if (changeState(oldState, State.COMPLETED)) { discardCurrentData(); writingComplete(); this.resultPublisher.publishComplete(); } else { this.state.get().onComplete(this); } }