T
- The type@Internal public abstract class AbstractBufferingHttpContentProcessor<T> extends SingleThreadedBufferingProcessor<io.netty.buffer.ByteBufHolder,T> implements HttpContentProcessor<T>
HttpContentProcessor
interface that deals with limiting file upload sizes.SingleThreadedBufferingSubscriber.BackPressureState, SingleThreadedBufferingSubscriber.DownstreamSubscription
Modifier and Type | Field and Description |
---|---|
protected long |
advertisedLength |
protected HttpServerConfiguration |
configuration |
protected NettyHttpRequest |
nettyHttpRequest |
protected java.util.concurrent.atomic.AtomicLong |
receivedLength |
protected long |
requestMaxSize |
upstreamBuffer, upstreamDemand, upstreamState, upstreamSubscription
Constructor and Description |
---|
AbstractBufferingHttpContentProcessor(NettyHttpRequest<?> nettyHttpRequest,
HttpServerConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
protected void |
doOnNext(io.netty.buffer.ByteBufHolder message)
Implement
Subscriber.onNext(Object) . |
protected void |
fireExceedsLength(long receivedLength,
long expected) |
void |
subscribe(org.reactivestreams.Subscriber<? super T> downstreamSubscriber) |
protected boolean |
verifyPartDefinedSize(io.netty.buffer.ByteBufHolder message) |
currentDownstreamSubscriber, doOnComplete, doOnError, doOnSubscribe, getDownstreamSubscriber, onUpstreamMessage, subscribeDownstream
newDownstreamSubscription, onComplete, onError, onNext, onSubscribe, provideDownstreamSubscription
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onComplete, onError, onNext, onSubscribe
isEnabled
protected final NettyHttpRequest nettyHttpRequest
protected final long advertisedLength
protected final long requestMaxSize
protected final java.util.concurrent.atomic.AtomicLong receivedLength
protected final HttpServerConfiguration configuration
public AbstractBufferingHttpContentProcessor(NettyHttpRequest<?> nettyHttpRequest, HttpServerConfiguration configuration)
nettyHttpRequest
- The NettyHttpRequest
configuration
- The HttpServerConfiguration
public void subscribe(org.reactivestreams.Subscriber<? super T> downstreamSubscriber)
subscribe
in interface org.reactivestreams.Publisher<T>
subscribe
in class SingleThreadedBufferingProcessor<io.netty.buffer.ByteBufHolder,T>
protected final void doOnNext(io.netty.buffer.ByteBufHolder message)
SingleThreadedBufferingSubscriber
Subscriber.onNext(Object)
.doOnNext
in class SingleThreadedBufferingProcessor<io.netty.buffer.ByteBufHolder,T>
message
- The messageprotected boolean verifyPartDefinedSize(io.netty.buffer.ByteBufHolder message)
message
- The messageprotected void fireExceedsLength(long receivedLength, long expected)
receivedLength
- The received lengthexpected
- The expected length