Package akka.http.scaladsl.model
Interface Multipart
- All Superinterfaces:
Multipart
- All Known Subinterfaces:
Multipart.Strict
- All Known Implementing Classes:
Multipart.ByteRanges
,Multipart.ByteRanges$.Strict
,Multipart.FormData
,Multipart.FormData$.Strict
,Multipart.General
,Multipart.General$.Strict
The model of multipart content for media-types
multipart/\*
(general multipart content),
multipart/form-data
and multipart/byteranges
.
The basic modelling classes for these media-types (Multipart.General
, Multipart.FormData
and
Multipart.ByteRanges
, respectively) are stream-based but each have a strict counterpart
(namely Multipart.General.Strict
, Multipart.FormData.Strict
and Multipart.ByteRanges.Strict
).
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
The general model for a single part of a multipart message.static class
static class
Model formultipart/byteranges
content as defined by https://tools.ietf.org/html/rfc7233#section-5.4.1 and https://tools.ietf.org/html/rfc7233#appendix-Astatic class
static class
Model formultipart/form-data
content as defined in http://tools.ietf.org/html/rfc2388.static class
static class
Basic model for general multipart content as defined by http://tools.ietf.org/html/rfc2046.static class
static interface
A type of multipart content for which all parts have already been loaded into memory and are therefore allow random access. -
Method Summary
Modifier and TypeMethodDescriptionJava APIakka.stream.javadsl.Source<? extends Multipart.BodyPart,
Object> getParts()
Java APIThe media-type this multipart content carries.akka.stream.scaladsl.Source<Multipart.BodyPart,
Object> parts()
The stream of body parts this content consists of.toEntity()
Creates an entity from this multipart object using a random boundary.Creates an entity from this multipart object using the specified boundary.Creates an entity from this multipart object using the specified boundary and logger.CompletionStage<? extends Multipart.Strict>
toStrict
(long timeoutMillis, akka.stream.Materializer materializer) Java APIscala.concurrent.Future<Multipart.Strict>
toStrict
(scala.concurrent.duration.FiniteDuration timeout, akka.stream.Materializer fm) Converts this content into its strict counterpart.
-
Method Details
-
mediaType
MediaType.Multipart mediaType()The media-type this multipart content carries.- Returns:
- (undocumented)
-
parts
akka.stream.scaladsl.Source<Multipart.BodyPart,Object> parts()The stream of body parts this content consists of.- Returns:
- (undocumented)
-
toStrict
scala.concurrent.Future<Multipart.Strict> toStrict(scala.concurrent.duration.FiniteDuration timeout, akka.stream.Materializer fm) Converts this content into its strict counterpart. The giventimeout
denotes the max time that an individual part must be read in. The Future is failed with an TimeoutException if one part isn't read completely after the given timeout.- Parameters:
timeout
- (undocumented)fm
- (undocumented)- Returns:
- (undocumented)
-
toEntity
Creates an entity from this multipart object using the specified boundary and logger.- Parameters:
boundary
- (undocumented)log
- (undocumented)- Returns:
- (undocumented)
-
toEntity
Creates an entity from this multipart object using the specified boundary. -
toEntity
RequestEntity toEntity()Creates an entity from this multipart object using a random boundary. -
getMediaType
MediaType.Multipart getMediaType()Java API- Specified by:
getMediaType
in interfaceMultipart
-
getParts
akka.stream.javadsl.Source<? extends Multipart.BodyPart,Object> getParts()Java API -
toStrict
CompletionStage<? extends Multipart.Strict> toStrict(long timeoutMillis, akka.stream.Materializer materializer) Java API
-