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
public interface Multipart extends Multipart
The model of multipart content for media-typesmultipart/\*
(general multipart content),multipart/form-data
andmultipart/byteranges
.The basic modelling classes for these media-types (
Multipart.General
,Multipart.FormData
andMultipart.ByteRanges
, respectively) are stream-based but each have a strict counterpart (namelyMultipart.General.Strict
,Multipart.FormData.Strict
andMultipart.ByteRanges.Strict
).
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Multipart.BodyPart
The general model for a single part of a multipart message.static class
Multipart.BodyPart$
static class
Multipart.ByteRanges
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
Multipart.ByteRanges$
static class
Multipart.FormData
Model formultipart/form-data
content as defined in http://tools.ietf.org/html/rfc2388.static class
Multipart.FormData$
static class
Multipart.General
Basic model for general multipart content as defined by http://tools.ietf.org/html/rfc2046.static class
Multipart.General$
static interface
Multipart.Strict
A type of multipart content for which all parts have already been loaded into memory and are therefore allow random access.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MediaType.Multipart
getMediaType()
Java APIakka.stream.javadsl.Source<? extends Multipart.BodyPart,java.lang.Object>
getParts()
Java APIMediaType.Multipart
mediaType()
The media-type this multipart content carries.akka.stream.scaladsl.Source<Multipart.BodyPart,java.lang.Object>
parts()
The stream of body parts this content consists of.RequestEntity
toEntity()
Creates an entity from this multipart object using a random boundary.RequestEntity
toEntity(java.lang.String boundary)
Creates an entity from this multipart object using the specified boundary.RequestEntity
toEntity(java.lang.String boundary, akka.event.LoggingAdapter log)
Creates an entity from this multipart object using the specified boundary and logger.java.util.concurrent.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 Detail
-
mediaType
MediaType.Multipart mediaType()
The media-type this multipart content carries.- Returns:
- (undocumented)
-
parts
akka.stream.scaladsl.Source<Multipart.BodyPart,java.lang.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
RequestEntity toEntity(java.lang.String boundary, akka.event.LoggingAdapter log)
Creates an entity from this multipart object using the specified boundary and logger.- Parameters:
boundary
- (undocumented)log
- (undocumented)- Returns:
- (undocumented)
-
toEntity
RequestEntity toEntity(java.lang.String boundary)
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,java.lang.Object> getParts()
Java API
-
toStrict
java.util.concurrent.CompletionStage<? extends Multipart.Strict> toStrict(long timeoutMillis, akka.stream.Materializer materializer)
Java API
-
-