org.jboss.resteasy.core
Class MediaTypeMap<T>

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

public class MediaTypeMap<T>
extends java.lang.Object

efficient MediaType index of T

Version:
$Revision: 1 $
Author:
Bill Burke

Nested Class Summary
static interface MediaTypeMap.Typed
           
 
Field Summary
static java.util.regex.Pattern COMPOSITE_SUBTYPE_WILDCARD_PATTERN
           
static java.util.regex.Pattern WILD_SUBTYPE_COMPOSITE_PATTERN
           
 
Constructor Summary
MediaTypeMap()
           
 
Method Summary
 void add(MediaType type, T obj)
           
 java.util.List<T> getPossible(MediaType accept)
          Returns a list of objects sorted based on their media type where the first in the list is the best match
 java.util.List<T> getPossible(MediaType accept, java.lang.Class type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPOSITE_SUBTYPE_WILDCARD_PATTERN

public static java.util.regex.Pattern COMPOSITE_SUBTYPE_WILDCARD_PATTERN

WILD_SUBTYPE_COMPOSITE_PATTERN

public static java.util.regex.Pattern WILD_SUBTYPE_COMPOSITE_PATTERN
Constructor Detail

MediaTypeMap

public MediaTypeMap()
Method Detail

add

public void add(MediaType type,
                T obj)

getPossible

public java.util.List<T> getPossible(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 java.util.List<T> getPossible(MediaType accept,
                                     java.lang.Class type)


Copyright © 2010. All Rights Reserved.