Class ServerMediaType

java.lang.Object
org.jboss.resteasy.reactive.common.util.ServerMediaType

public class ServerMediaType extends Object
A representation of a server side media type. TODO: This belongs in the server module but needs to be untangled from ResourceWriter (in a way that doesn't hurt performance) to make that happen
  • Constructor Details

    • ServerMediaType

      public ServerMediaType(List<jakarta.ws.rs.core.MediaType> mediaTypes, String charset, boolean deprioritizeWildcards)
      Parameters:
      mediaTypes - The original media types
      charset - charset to use
      deprioritizeWildcards - whether or not wildcard types should be carry less weight when sorting is performed
  • Method Details

    • mediaTypesFromArray

      public static List<jakarta.ws.rs.core.MediaType> mediaTypesFromArray(String[] mediaTypesStrs)
    • negotiateProduces

      public Map.Entry<jakarta.ws.rs.core.MediaType,jakarta.ws.rs.core.MediaType> negotiateProduces(String acceptHeader)
      Returns:
      An entry containing the negotiated desired media type as a key and the negotiated provided media type as a value
    • negotiateProduces

      public Map.Entry<jakarta.ws.rs.core.MediaType,jakarta.ws.rs.core.MediaType> negotiateProduces(String acceptHeader, jakarta.ws.rs.core.MediaType hardCoded)
      Returns:
      An entry containing the negotiated desired media type as a key and the negotiated provided media type as a value
    • getSortedMediaTypes

      public jakarta.ws.rs.core.MediaType[] getSortedMediaTypes()
    • getSortedOriginalMediaTypes

      public jakarta.ws.rs.core.MediaType[] getSortedOriginalMediaTypes()