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 TypeMethodDescriptionboolean
charset()
endHandler
(Runnable endHandler) boolean
exceptionHandler
(Consumer<Throwable> handler) fetch
(long amount) file()
filename()
io.vertx.core.http.HttpServerFileUpload
int
hashCode()
boolean
name()
static HttpServerFileUpload
newInstance
(io.vertx.core.http.HttpServerFileUpload arg) pause()
pipe()
io.smallrye.mutiny.Uni<Void>
pipeTo
(WriteStream<Buffer> dst) Pipe thisReadStream
to theWriteStream
.pipeToAndAwait
(WriteStream<Buffer> dst) Blocking variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)
.void
pipeToAndForget
(WriteStream<Buffer> dst) Variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)
that ignores the result of the operation.resume()
long
size()
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)
.void
streamToFileSystemAndForget
(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:
getDelegate
in interfaceMutinyDelegate
- Specified by:
getDelegate
in interfaceReadStream<Buffer>
- Specified by:
getDelegate
in interfaceStreamBase
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
pipe
- Specified by:
pipe
in interfaceReadStream<Buffer>
- Returns:
- a pipe
-
pipeTo
Pipe thisReadStream
to 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
handler
will 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:
pipeTo
in interfaceReadStream<Buffer>
- Parameters:
dst
- the destination write stream- Returns:
- the
uni
firing 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:
pipeToAndAwait
in 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:
pipeToAndForget
in interfaceReadStream<Buffer>
- Parameters:
dst
- the destination write stream
-
exceptionHandler
- Specified by:
exceptionHandler
in interfaceReadStream<Buffer>
- Specified by:
exceptionHandler
in interfaceStreamBase
- Parameters:
handler
- the exception handler- Returns:
-
handler
- Specified by:
handler
in interfaceReadStream<Buffer>
- Returns:
-
endHandler
- Specified by:
endHandler
in interfaceReadStream<Buffer>
- Returns:
-
pause
- Specified by:
pause
in interfaceReadStream<Buffer>
- Returns:
- a reference to this, so the API can be used fluently
-
resume
- Specified by:
resume
in interfaceReadStream<Buffer>
- Returns:
- a reference to this, so the API can be used fluently
-
fetch
- Specified by:
fetch
in 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
uni
firing 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:
true
when 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:
true
if 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:
toMulti
in interfaceReadStream<Buffer>
-
toBlockingIterable
-
toBlockingStream
-
newInstance
-