Class MediaRange

java.lang.Object
akka.http.javadsl.model.MediaRange
Direct Known Subclasses:
MediaRange

public abstract class MediaRange extends Object
Represents an Http media-range. A media-range either matches a single media-type or it matches all media-types of a given main-type. Each range can specify a qValue or other parameters.
  • Constructor Details

    • MediaRange

      public MediaRange()
  • Method Details

    • mainType

      public abstract String mainType()
      Returns the main-type this media-range matches.
    • qValue

      public abstract float qValue()
      Returns the qValue of this media-range.
    • matches

      public abstract boolean matches(MediaType mediaType)
      Checks if this range matches a given media-type.
    • getParams

      public abstract Map<String,String> getParams()
      Returns a Map of the parameters of this media-range.
    • withQValue

      public abstract MediaRange withQValue(float qValue)
      Returns a copy of this instance with a changed qValue.