Class CombinedMediaType
java.lang.Object
org.glassfish.jersey.internal.routing.CombinedMediaType
Represents function S as defined in the Request Matching part of the spec.
- Author:
- Jakub Podlesak, Miroslav Fuksa
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classMedia typeextended by flag indicating whether media type was obtained from user annotationsConsumesorProducesor has no annotation and therefore was derived fromMessageBodyWorkers. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<CombinedMediaType>Comparator used to compareCombinedMediaType.static final CombinedMediaTypeConstant combined type representing no match. -
Method Summary
Modifier and TypeMethodDescriptionstatic CombinedMediaTypecreate(MediaType clientType, CombinedMediaType.EffectiveMediaType serverType) Create combined client/server media type.Get combined client/serverMediaType, stripped of q and qs parameters.toString()
-
Field Details
-
NO_MATCH
Constant combined type representing no match. -
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 Details
-
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.
-
toString
-