Class CombinedMediaType
- java.lang.Object
-
- org.glassfish.jersey.internal.routing.CombinedMediaType
-
public final class CombinedMediaType extends Object
Represents function S as defined in the Request Matching part of the spec.- Author:
- Jakub Podlesak, Miroslav Fuksa
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCombinedMediaType.EffectiveMediaTypeMedia typeextended by flag indicating whether media type was obtained from user annotationsConsumesorProducesor has no annotation and therefore was derived fromMessageBodyWorkers.
-
Field Summary
Fields Modifier and Type Field Description static Comparator<CombinedMediaType>COMPARATORComparator used to compareCombinedMediaType.static CombinedMediaTypeNO_MATCHConstant combined type representing no match.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CombinedMediaTypecreate(MediaType clientType, CombinedMediaType.EffectiveMediaType serverType)Create combined client/server media type.MediaTypegetCombinedType()Get combined client/serverMediaType, stripped of q and qs parameters.StringtoString()
-
-
-
Field Detail
-
NO_MATCH
public static final CombinedMediaType NO_MATCH
Constant combined type representing no match.
-
COMPARATOR
public static final Comparator<CombinedMediaType> COMPARATOR
Comparator used to compareCombinedMediaType. The comparator sorts the elements of list in the ascending order from the most appropriate to the least appropriate combined media type.
-
-
Method Detail
-
getCombinedType
public MediaType getCombinedType()
Get combined client/serverMediaType, stripped of q and qs parameters.- Returns:
- Combined client/server media type, stripped of q and qs parameters.
-
create
public static CombinedMediaType create(MediaType clientType, CombinedMediaType.EffectiveMediaType serverType)
Create combined client/server media type. if the two types are not compatible,NO_MATCHis returned.- Parameters:
clientType- client-side media type.serverType- server-side media type.- Returns:
- combined client/server media type.
-
-