Class HttpServerFileUpload
- All Implemented Interfaces:
MutinyDelegate,ReadStream<Buffer>,StreamBase
original non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHttpServerFileUpload(io.vertx.core.http.HttpServerFileUpload delegate) HttpServerFileUpload(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionbooleancharset()endHandler(Runnable endHandler) booleanexceptionHandler(Consumer<Throwable> handler) fetch(long amount) file()filename()io.vertx.core.http.HttpServerFileUploadinthashCode()booleanname()static HttpServerFileUploadnewInstance(io.vertx.core.http.HttpServerFileUpload arg) pause()pipe()io.smallrye.mutiny.Uni<Void>pipeTo(WriteStream<Buffer> dst) Pipe thisReadStreamto theWriteStream.pipeToAndAwait(WriteStream<Buffer> dst) Blocking variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream).voidpipeToAndForget(WriteStream<Buffer> dst) Variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)that ignores the result of the operation.resume()longsize()io.smallrye.mutiny.Uni<Void>streamToFileSystem(String filename) Stream the content of this upload to the given file on storage.streamToFileSystemAndAwait(String filename) Blocking variant ofstreamToFileSystem(String).voidstreamToFileSystemAndForget(String filename) Variant ofstreamToFileSystem(String)that ignores the result of the operation.io.smallrye.mutiny.Multi<Buffer>toMulti()toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
HttpServerFileUpload
public HttpServerFileUpload(io.vertx.core.http.HttpServerFileUpload delegate) -
HttpServerFileUpload
-
-
Method Details
-
getDelegate
public io.vertx.core.http.HttpServerFileUpload getDelegate()- Specified by:
getDelegatein interfaceMutinyDelegate- Specified by:
getDelegatein interfaceReadStream<Buffer>- Specified by:
getDelegatein interfaceStreamBase- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
pipe
- Specified by:
pipein interfaceReadStream<Buffer>- Returns:
- a pipe
-
pipeTo
Pipe thisReadStreamto theWriteStream.Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the
handlerwill be called with the result.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Specified by:
pipeToin interfaceReadStream<Buffer>- Parameters:
dst- the destination write stream- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
pipeToAndAwait
Blocking variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Specified by:
pipeToAndAwaitin interfaceReadStream<Buffer>- Parameters:
dst- the destination write stream- Returns:
- the Void instance produced by the operation.
-
pipeToAndForget
Variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)that ignores the result of the operation.This method subscribes on the result of
ReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)but you don't need to compose it with other operations.- Specified by:
pipeToAndForgetin interfaceReadStream<Buffer>- Parameters:
dst- the destination write stream
-
exceptionHandler
- Specified by:
exceptionHandlerin interfaceReadStream<Buffer>- Specified by:
exceptionHandlerin interfaceStreamBase- Parameters:
handler- the exception handler- Returns:
-
handler
- Specified by:
handlerin interfaceReadStream<Buffer>- Returns:
-
endHandler
- Specified by:
endHandlerin interfaceReadStream<Buffer>- Returns:
-
pause
- Specified by:
pausein interfaceReadStream<Buffer>- Returns:
- a reference to this, so the API can be used fluently
-
resume
- Specified by:
resumein interfaceReadStream<Buffer>- Returns:
- a reference to this, so the API can be used fluently
-
fetch
- Specified by:
fetchin interfaceReadStream<Buffer>- Returns:
- a reference to this, so the API can be used fluently
-
streamToFileSystem
Stream the content of this upload to the given file on storage.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
filename- the name of the file- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
streamToFileSystemAndAwait
Blocking variant ofstreamToFileSystem(String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
filename- the name of the file- Returns:
- the Void instance produced by the operation.
-
streamToFileSystemAndForget
Variant ofstreamToFileSystem(String)that ignores the result of the operation.This method subscribes on the result of
streamToFileSystem(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromstreamToFileSystem(String)but you don't need to compose it with other operations.- Parameters:
filename- the name of the file
-
cancelStreamToFileSystem
public boolean cancelStreamToFileSystem()- Returns:
truewhen the stream is cancelled, otherwise it means that stream is finished
-
filename
- Returns:
- the filename which was used when upload the file.
-
name
- Returns:
- the name of the attribute
-
contentType
- Returns:
- the content type for the upload
-
contentTransferEncoding
- Returns:
- the contentTransferEncoding for the upload
-
charset
- Returns:
- the charset for the upload
-
size
public long size()- Returns:
- the size of the upload (in bytes)
-
isSizeAvailable
public boolean isSizeAvailable()- Returns:
trueif the size of the upload can be retrieved viasize().
-
file
- Returns:
- the async uploaded file when
streamToFileSystem(java.lang.String)has been used and the file is available
-
toMulti
- Specified by:
toMultiin interfaceReadStream<Buffer>
-
toBlockingIterable
-
toBlockingStream
-
newInstance
-