Class HttpMultiPartContentDecoder
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- com.linkedin.alpini.netty4.handlers.ChannelInitializer<C>
-
- com.linkedin.alpini.netty4.handlers.SimpleChannelInitializer<io.netty.channel.Channel>
-
- com.linkedin.alpini.netty4.handlers.HttpMultiPartContentDecoder
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
public class HttpMultiPartContentDecoder extends SimpleChannelInitializer<io.netty.channel.Channel>
Decodes MIME multipart encoded content bodies by separating them into separateHttpMessage
objects. Created by acurtis on 3/22/17.
-
-
Constructor Summary
Constructors Constructor Description HttpMultiPartContentDecoder(int maxHeaderSize, int maxChunkSize, int maxContentLength)
HttpMultiPartContentDecoder(java.util.function.IntSupplier maxHeaderSize, java.util.function.IntSupplier maxChunkSize, java.util.function.IntSupplier maxContentLength)
HttpMultiPartContentDecoder(java.util.function.IntSupplier maxHeaderSize, java.util.function.IntSupplier maxChunkSize, java.util.function.IntSupplier maxContentLength, boolean validateHeaders, int initialBufferSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkUnwrapBoundary(io.netty.channel.Channel ch, java.lang.String boundary)
protected void
initChannel(io.netty.channel.Channel ch)
This method will be called once theChannel
was registered.-
Methods inherited from class com.linkedin.alpini.netty4.handlers.SimpleChannelInitializer
addAfter, addAfter, addAfter, addAfter, addAfter, addAfter, addAfter
-
Methods inherited from class com.linkedin.alpini.netty4.handlers.ChannelInitializer
channelRegistered, currentContext, exceptionCaught, handlerAdded, handlerRemoved
-
-
-
-
Constructor Detail
-
HttpMultiPartContentDecoder
public HttpMultiPartContentDecoder(int maxHeaderSize, int maxChunkSize, int maxContentLength)
-
HttpMultiPartContentDecoder
public HttpMultiPartContentDecoder(@Nonnull java.util.function.IntSupplier maxHeaderSize, @Nonnull java.util.function.IntSupplier maxChunkSize, @Nonnull java.util.function.IntSupplier maxContentLength)
-
HttpMultiPartContentDecoder
public HttpMultiPartContentDecoder(@Nonnull java.util.function.IntSupplier maxHeaderSize, @Nonnull java.util.function.IntSupplier maxChunkSize, @Nonnull java.util.function.IntSupplier maxContentLength, boolean validateHeaders, int initialBufferSize)
-
-
Method Detail
-
checkUnwrapBoundary
protected boolean checkUnwrapBoundary(io.netty.channel.Channel ch, java.lang.String boundary)
-
initChannel
protected void initChannel(io.netty.channel.Channel ch) throws java.lang.Exception
Description copied from class:ChannelInitializer
This method will be called once theChannel
was registered. After the method returns this instance will be removed from theChannelPipeline
of theChannel
.- Specified by:
initChannel
in classChannelInitializer<io.netty.channel.Channel>
- Parameters:
ch
- theChannel
which was registered.- Throws:
java.lang.Exception
- is thrown if an error occurs. In that case it will be handled byChannelInitializer.exceptionCaught(ChannelHandlerContext, Throwable)
which will by default close theChannel
.
-
-