Class MediaTypeMap<T>

java.lang.Object
org.jboss.resteasy.core.MediaTypeMap<T>

public class MediaTypeMap<T> extends Object
efficient MediaType index of T
Version:
$Revision: 1 $
Author:
Bill Burke
  • Field Details

    • COMPOSITE_SUBTYPE_WILDCARD_PATTERN

      public static Pattern COMPOSITE_SUBTYPE_WILDCARD_PATTERN
    • WILD_SUBTYPE_COMPOSITE_PATTERN

      public static Pattern WILD_SUBTYPE_COMPOSITE_PATTERN
    • useCache

      public static boolean useCache
      By default, MediaTypeMap will cache possible MediaType/Class matches. Set this to false to turn off caching
  • Constructor Details

    • MediaTypeMap

      public MediaTypeMap()
  • Method Details

    • clone

      public MediaTypeMap<T> clone()
      Overrides:
      clone in class Object
    • getClassCache

      public Map<MediaTypeMap.CachedMediaTypeAndClass,List<T>> getClassCache()
    • add

      public void add(javax.ws.rs.core.MediaType type, T obj)
      Add an object to the media type map. This is synchronized to serialize adds.
      Parameters:
      type -
      obj -
    • getPossible

      public List<T> getPossible(javax.ws.rs.core.MediaType accept)
      Returns a list of objects sorted based on their media type where the first in the list is the best match
      Parameters:
      accept - mime to match
      Returns:
    • getPossible

      public List<T> getPossible(javax.ws.rs.core.MediaType accept, Class<?> type)