public AsyncHandler.State onContentWriteProgress(long amount, long current, long total) { return delegate.onContentWriteProgress(amount, current, total); } }
void operationComplete(Channel channel, Throwable cause) { future.touch(); // The write operation failed. If the channel was cached, it means it got asynchronously closed. // Let's retry a second time. if (abortOnThrowable(channel, cause)) { return; } if (progressAsyncHandler != null) { // We need to make sure we aren't in the middle of an authorization process before publishing events as we will re-publish again the same event after the authorization, // causing unpredictable behavior. boolean startPublishing = !future.isInAuth() && !future.isInProxyAuth(); if (startPublishing) { if (notifyHeaders) { progressAsyncHandler.onHeadersWritten(); } else { progressAsyncHandler.onContentWritten(); } } } } }
public AsyncHandler.State onContentWritten() { return delegate.onContentWritten(); }
public AsyncHandler.State onHeadersWritten() { return delegate.onHeadersWritten(); }
public void operationComplete(ChannelFuture cf) { if (!abortOnThrowable(cf.getCause(), cf.getChannel())) { future.touch(); /** * We need to make sure we aren't in the middle of an authorization process before publishing events as we will re-publish again the same event after the authorization, * causing unpredictable behavior. */ Realm realm = future.getRequest().getRealm() != null ? future.getRequest().getRealm() : config.getRealm(); boolean startPublishing = future.isInAuth() || realm == null || realm.getUsePreemptiveAuth(); if (startPublishing && asyncHandler instanceof ProgressAsyncHandler) { if (notifyHeaders) { ProgressAsyncHandler.class.cast(asyncHandler).onHeaderWriteCompleted(); } else { ProgressAsyncHandler.class.cast(asyncHandler).onContentWriteCompleted(); } } } }
@Override public final State onContentWritten() { return emitter.isDisposed() ? disposed() : delegate().onContentWritten(); }
@Override public final State onHeadersWritten() { return emitter.isDisposed() ? disposed() : delegate().onHeadersWritten(); }
@Override public void operationComplete(ChannelProgressiveFuture cf) { // The write operation failed. If the channel was cached, it means it got asynchronously closed. // Let's retry a second time. if (!abortOnThrowable(cf.cause(), cf.channel())) { future.touch(); /** * We need to make sure we aren't in the middle of an authorization * process before publishing events as we will re-publish again the * same event after the authorization, causing unpredictable * behavior. */ Realm realm = future.getRequest().getRealm() != null ? future.getRequest().getRealm() : config.getRealm(); boolean startPublishing = future.isInAuth() || realm == null || realm.getUsePreemptiveAuth(); if (startPublishing && asyncHandler instanceof ProgressAsyncHandler) { ProgressAsyncHandler<?> progressAsyncHandler = (ProgressAsyncHandler<?>) asyncHandler; if (notifyHeaders) { progressAsyncHandler.onHeaderWriteCompleted(); } else { progressAsyncHandler.onContentWriteCompleted(); } } } }
@Override public void operationProgressed(ChannelProgressiveFuture f, long progress, long total) { future.touch(); if (progressAsyncHandler != null && !notifyHeaders) { long lastLastProgress = lastProgress; lastProgress = progress; if (total < 0) { total = expectedTotal; } if (progress != lastLastProgress) { progressAsyncHandler.onContentWriteProgress(progress - lastLastProgress, progress, total); } } } }
public void operationComplete(ChannelFuture cf) { if (!abortOnThrowable(cf.getCause(), cf.getChannel())) { future.touch(); /** * We need to make sure we aren't in the middle of an authorization process before publishing events as we will re-publish again the same event after the authorization, * causing unpredictable behavior. */ Realm realm = future.getRequest().getRealm() != null ? future.getRequest().getRealm() : config.getRealm(); boolean startPublishing = future.isInAuth() || realm == null || realm.getUsePreemptiveAuth(); if (startPublishing && asyncHandler instanceof ProgressAsyncHandler) { if (notifyHeaders) { ProgressAsyncHandler.class.cast(asyncHandler).onHeadersWritten(); } else { ProgressAsyncHandler.class.cast(asyncHandler).onContentWritten(); } } } }
@Override public State onContentWritten() { return subscriber.isUnsubscribed() ? abort() : delegate().onContentWritten(); }
@Override public State onHeadersWritten() { return subscriber.isUnsubscribed() ? abort() : delegate().onHeadersWritten(); }
@Override public State onContentWriteProgress(long amount, long current, long total) { return subscriber.isUnsubscribed() ? abort() : delegate().onContentWriteProgress(amount, current, total); }
@Override public void operationComplete(ChannelProgressiveFuture cf) { // The write operation failed. If the channel was cached, it means it got asynchronously closed. // Let's retry a second time. if (!abortOnThrowable(cf.cause(), cf.channel())) { future.touch(); /** * We need to make sure we aren't in the middle of an authorization * process before publishing events as we will re-publish again the * same event after the authorization, causing unpredictable * behavior. */ Realm realm = future.getRequest().getRealm() != null ? future.getRequest().getRealm() : config.getRealm(); boolean startPublishing = future.isInAuth() || realm == null || realm.getUsePreemptiveAuth(); if (startPublishing && asyncHandler instanceof ProgressAsyncHandler) { ProgressAsyncHandler<?> progressAsyncHandler = (ProgressAsyncHandler<?>) asyncHandler; if (notifyHeaders) { progressAsyncHandler.onHeadersWritten(); } else { progressAsyncHandler.onContentWritten(); } } } }
public AsyncHandler.State onContentWritten() { return delegate.onContentWritten(); }
public AsyncHandler.State onHeadersWritten() { return delegate.onHeadersWritten(); }
@Override public final State onContentWriteProgress(long amount, long current, long total) { return emitter.isDisposed() ? disposed() : delegate().onContentWriteProgress(amount, current, total); }
public AsyncHandler.State onContentWriteProgress(long amount, long current, long total) { return delegate.onContentWriteProgress(amount, current, total); } }
public void operationProgressed(ChannelFuture cf, long amount, long current, long total) { future.touch(); if (asyncHandler instanceof ProgressAsyncHandler) { ProgressAsyncHandler.class.cast(asyncHandler).onContentWriteProgress(amount, current, total); } } }
@Override public void operationProgressed(ChannelProgressiveFuture f, long progress, long total) { future.touch(); if (!notifyHeaders && asyncHandler instanceof ProgressAsyncHandler) { long lastLastProgress = lastProgress; lastProgress = progress; if (total < 0) total = expectedTotal; ProgressAsyncHandler.class.cast(asyncHandler).onContentWriteProgress(progress - lastLastProgress, progress, total); } } }