Class MediaTypeMap<T>
java.lang.Object
org.jboss.resteasy.core.MediaTypeMap<T>
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMediaTypeMap
(MediaTypeMap<T> mediaTypeMap) Shallow copy, any additional adds will deep copy -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an object to the media type map.void
Add an object to the media type map.protected void
void
addCompositeWild
(jakarta.ws.rs.core.MediaType mediaType, T obj, String baseSubtype) void
addRegular
(jakarta.ws.rs.core.MediaType mediaType, T obj) void
addWildcard
(T obj) void
addWildComposite
(jakarta.ws.rs.core.MediaType mediaType, T obj, String baseSubtype) void
addWildSubtype
(jakarta.ws.rs.core.MediaType mediaType, T obj) static String
compositeWildSubtype
(String subtype) getPossible
(jakarta.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
(jakarta.ws.rs.core.MediaType accept, Class<?> type) void
After this is called, all new adds will deep copy itself.static String
wildCompositeSubtype
(String subtype)
-
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() -
MediaTypeMap
Shallow copy, any additional adds will deep copy- Parameters:
mediaTypeMap
-
-
-
Method Details
-
compositeWildSubtype
-
wildCompositeSubtype
-
lockSnapshots
public void lockSnapshots()After this is called, all new adds will deep copy itself. -
add
Add an object to the media type map. This is synchronized to serialize adds.- Parameters:
type
- media typeobj
- object
-
add
-
addWildcard
-
add
-
addRegular
-
addCompositeWild
-
addWildComposite
-
addWildSubtype
-
getPossible
-
getPossible
-