Package org.jboss.resteasy.core
Class MediaTypeMap<T>
java.lang.Object
org.jboss.resteasy.core.MediaTypeMap<T>
efficient MediaType index of T
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interface -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an object to the media type map.clone()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 matchgetPossible(javax.ws.rs.core.MediaType accept, Class<?> type)
-
Field Details
-
COMPOSITE_SUBTYPE_WILDCARD_PATTERN
-
WILD_SUBTYPE_COMPOSITE_PATTERN
-
useCache
public static boolean useCacheBy default, MediaTypeMap will cache possible MediaType/Class matches. Set this to false to turn off caching
-
-
Constructor Details
-
MediaTypeMap
public MediaTypeMap()
-
-
Method Details
-
clone
-
getClassCache
-
add
Add an object to the media type map. This is synchronized to serialize adds.- Parameters:
type-obj-
-
getPossible
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
-