Class MediaRange
java.lang.Object
org.apache.pekko.http.javadsl.model.MediaRange
org.apache.pekko.http.scaladsl.model.MediaRange
- All Implemented Interfaces:
Renderable,WithQValue<MediaRange>
- Direct Known Subclasses:
MediaRange.One,MediaRanges.PredefinedMediaRange
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MediaRangestatic MediaRangestatic MediaRangeJava APIbooleanbooleanisAudio()booleanisImage()booleanbooleanbooleanisText()booleanisVideo()booleanabstract StringmainType()Returns the main-type this media-range matches.booleanJava APIabstract booleanparams()abstract floatqValue()Returns the qValue of this media-range.splitOffQValue(scala.collection.immutable.Map<String, String> params, float defaultQ) abstract Stringvalue()withCharsetRange(HttpCharsetRange charsetRange) Constructs aContentTypeRangefrom this instance and the given charset.abstract MediaRangewithParams(scala.collection.immutable.Map<String, String> params) Returns a copy of this instance with the params replaced by the given ones.Methods inherited from class org.apache.pekko.http.javadsl.model.MediaRange
withQValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pekko.http.impl.util.Renderable
renderMethods inherited from interface org.apache.pekko.http.scaladsl.model.WithQValue
withQValue, withQValue
-
Constructor Details
-
MediaRange
public MediaRange()
-
-
Method Details
-
splitOffQValue
-
custom
public static MediaRange custom(String mainType, scala.collection.immutable.Map<String, String> params, float qValue) -
apply
-
apply
-
value
-
mainType
Description copied from class:MediaRangeReturns the main-type this media-range matches.- Specified by:
mainTypein classMediaRange
-
params
-
qValue
public abstract float qValue()Description copied from class:MediaRangeReturns the qValue of this media-range.- Specified by:
qValuein classMediaRange
-
matches
-
isApplication
public boolean isApplication() -
isAudio
public boolean isAudio() -
isImage
public boolean isImage() -
isMessage
public boolean isMessage() -
isMultipart
public boolean isMultipart() -
isText
public boolean isText() -
isVideo
public boolean isVideo() -
isWildcard
public boolean isWildcard() -
withParams
Returns a copy of this instance with the params replaced by the given ones. If the given map contains a "q" value theqValuemember is (also) updated.- Parameters:
params- (undocumented)- Returns:
- (undocumented)
-
withCharsetRange
Constructs aContentTypeRangefrom this instance and the given charset.- Parameters:
charsetRange- (undocumented)- Returns:
- (undocumented)
-
getParams
Java API- Specified by:
getParamsin classMediaRange
-
matches
Java API- Specified by:
matchesin classMediaRange
-