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-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).

  • 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 given timeout 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(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(String boundary)
      Creates an entity from this multipart object using the specified boundary.
      Specified by:
      toEntity in interface Multipart
      Parameters:
      boundary - (undocumented)
      Returns:
      (undocumented)
    • toEntity

      RequestEntity toEntity()
      Creates an entity from this multipart object using a random boundary.
      Specified by:
      toEntity in interface Multipart
      Returns:
      (undocumented)
    • getMediaType

      MediaType.Multipart getMediaType()
      Java API
      Specified by:
      getMediaType in interface Multipart
    • getParts

      akka.stream.javadsl.Source<? extends Multipart.BodyPart,Object> getParts()
      Java API
      Specified by:
      getParts in interface Multipart
    • toStrict

      CompletionStage<? extends Multipart.Strict> toStrict(long timeoutMillis, akka.stream.Materializer materializer)
      Java API
      Specified by:
      toStrict in interface Multipart