public class MultipartFormUpload extends Object implements ReadStream<Buffer>
| Constructor and Description |
|---|
MultipartFormUpload(Context context,
MultipartForm parts,
boolean multipart,
io.netty.handler.codec.http.multipart.HttpPostRequestEncoder.EncoderMode encoderMode) |
| Modifier and Type | Method and Description |
|---|---|
MultipartFormUpload |
endHandler(Handler<Void> handler)
Set an end handler.
|
MultipartFormUpload |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
ReadStream<Buffer> |
fetch(long amount)
Fetch the specified
amount of elements. |
MultipartFormUpload |
handler(Handler<Buffer> handler)
Set a data handler.
|
MultiMap |
headers() |
MultipartFormUpload |
pause()
Pause the
ReadStream, it sets the buffer in fetch mode and clears the actual demand. |
MultipartFormUpload |
resume()
Resume reading, and sets the buffer in
flowing mode. |
void |
run() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpipe, pipeTo, pipeTopublic MultipartFormUpload(Context context, MultipartForm parts, boolean multipart, io.netty.handler.codec.http.multipart.HttpPostRequestEncoder.EncoderMode encoderMode) throws Exception
Exceptionpublic void run()
public MultiMap headers()
public MultipartFormUpload exceptionHandler(Handler<Throwable> handler)
ReadStreamexceptionHandler in interface ReadStream<Buffer>exceptionHandler in interface StreamBasehandler - the exception handlerpublic MultipartFormUpload handler(Handler<Buffer> handler)
ReadStreamhandler in interface ReadStream<Buffer>public MultipartFormUpload pause()
ReadStreamReadStream, it sets the buffer in fetch mode and clears the actual demand.
While it's paused, no data will be sent to the data handler.
pause in interface ReadStream<Buffer>public ReadStream<Buffer> fetch(long amount)
ReadStreamamount of elements. If the ReadStream has been paused, reading will
recommence with the specified amount of items, otherwise the specified amount will
be added to the current stream demand.fetch in interface ReadStream<Buffer>public MultipartFormUpload resume()
ReadStreamflowing mode.
If the ReadStream has been paused, reading will recommence on it.resume in interface ReadStream<Buffer>public MultipartFormUpload endHandler(Handler<Void> handler)
ReadStreamendHandler in interface ReadStream<Buffer>Copyright © 2020. All rights reserved.