public class MediaTypeMap<T> extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
MediaTypeMap.Typed |
Modifier and Type | Field and Description |
---|---|
static Pattern |
COMPOSITE_SUBTYPE_WILDCARD_PATTERN |
static boolean |
useCache
By default, MediaTypeMap will cache possible MediaType/Class matches.
|
static Pattern |
WILD_SUBTYPE_COMPOSITE_PATTERN |
Constructor and Description |
---|
MediaTypeMap() |
MediaTypeMap(MediaTypeMap<T> mediaTypeMap) |
Modifier and Type | Method and Description |
---|---|
void |
add(javax.ws.rs.core.MediaType type,
T obj)
Add an object to the media type map.
|
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
|
List<T> |
getPossible(javax.ws.rs.core.MediaType accept,
Class<?> type) |
public static final Pattern COMPOSITE_SUBTYPE_WILDCARD_PATTERN
public static final Pattern WILD_SUBTYPE_COMPOSITE_PATTERN
public static boolean useCache
public MediaTypeMap()
public MediaTypeMap(MediaTypeMap<T> mediaTypeMap)
public void add(javax.ws.rs.core.MediaType type, T obj)
type
- media typeobj
- objectpublic List<T> getPossible(javax.ws.rs.core.MediaType accept)
accept
- mime to matchCopyright © 2019 JBoss by Red Hat. All rights reserved.