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
  • Field Details

    • NO_MATCH

      public static final CombinedMediaType NO_MATCH
      Constant combined type representing no match.
    • COMPARATOR

      public static final Comparator<CombinedMediaType> COMPARATOR
      Comparator used to compare CombinedMediaType. 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

      public MediaType getCombinedType()
      Get combined client/server MediaType, 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_MATCH is returned.
      Parameters:
      clientType - client-side media type.
      serverType - server-side media type.
      Returns:
      combined client/server media type.
    • toString

      public String toString()
      Overrides:
      toString in class Object