T - The type@Internal public abstract class AbstractHttpContentProcessor<T> extends io.micronaut.core.async.processor.SingleSubscriberProcessor<io.netty.buffer.ByteBufHolder,T> implements HttpContentProcessor<T>
HttpContentProcessor interface that deals with limiting file upload sizes.| Modifier and Type | Field and Description |
|---|---|
protected long |
advertisedLength |
protected io.micronaut.http.server.HttpServerConfiguration |
configuration |
protected NettyHttpRequest<?> |
nettyHttpRequest |
protected java.util.concurrent.atomic.AtomicLong |
receivedLength |
protected long |
requestMaxSize |
| Constructor and Description |
|---|
AbstractHttpContentProcessor(NettyHttpRequest<?> nettyHttpRequest,
io.micronaut.http.server.HttpServerConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doOnNext(io.netty.buffer.ByteBufHolder message) |
protected void |
doSubscribe(org.reactivestreams.Subscriber<? super T> subscriber) |
protected void |
fireExceedsLength(long receivedLength,
long expected,
io.netty.buffer.ByteBufHolder message) |
protected abstract void |
onData(io.netty.buffer.ByteBufHolder message)
Called after verifying the data of the message.
|
currentSubscriber, doAfterComplete, doAfterOnError, doAfterOnSubscribe, doOnComplete, doOnError, doOnSubscribe, doOnSubscribe, getSubscriber, subscribeisComplete, onComplete, onError, onNext, onSubscribeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected final NettyHttpRequest<?> nettyHttpRequest
protected final long advertisedLength
protected final long requestMaxSize
protected final java.util.concurrent.atomic.AtomicLong receivedLength
protected final io.micronaut.http.server.HttpServerConfiguration configuration
public AbstractHttpContentProcessor(NettyHttpRequest<?> nettyHttpRequest, io.micronaut.http.server.HttpServerConfiguration configuration)
nettyHttpRequest - The NettyHttpRequestconfiguration - The HttpServerConfigurationprotected abstract void onData(io.netty.buffer.ByteBufHolder message)
message - The messageprotected final void doSubscribe(org.reactivestreams.Subscriber<? super T> subscriber)
doSubscribe in class io.micronaut.core.async.processor.SingleSubscriberProcessor<io.netty.buffer.ByteBufHolder,T>protected final void doOnNext(io.netty.buffer.ByteBufHolder message)
doOnNext in class io.micronaut.core.async.subscriber.CompletionAwareSubscriber<io.netty.buffer.ByteBufHolder>protected void fireExceedsLength(long receivedLength,
long expected,
io.netty.buffer.ByteBufHolder message)
receivedLength - The length of the content receivedexpected - The expected length of the contentmessage - The message to release