javax.ws.rs.core
Class ApplicationConfig

java.lang.Object
  extended by javax.ws.rs.core.ApplicationConfig

public abstract class ApplicationConfig
extends java.lang.Object

Defines the components of a JAX-RS application and supplies additional metadata.


Constructor Summary
ApplicationConfig()
           
 
Method Summary
 java.util.Map<java.lang.String,java.lang.String> getLanguageMappings()
          Get a map of file extension to language.
 java.util.Map<java.lang.String,MediaType> getMediaTypeMappings()
          Get a map of file extension to media type.
 java.util.Set<java.lang.Class<?>> getProviderClasses()
          Get a list of provider classes.
abstract  java.util.Set<java.lang.Class<?>> getResourceClasses()
          Get a list of root resource classes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationConfig

public ApplicationConfig()
Method Detail

getResourceClasses

public abstract java.util.Set<java.lang.Class<?>> getResourceClasses()
Get a list of root resource classes. An implementation should warn about and ignore classes that do not conform to the requirements of root resource classes.

Returns:
a list of root resource classes.
See Also:
Path

getProviderClasses

public java.util.Set<java.lang.Class<?>> getProviderClasses()
Get a list of provider classes. An implementation should warn about and ignore classes that do not conform to the requirements of a provider. The default implementation returns an empty set.

Returns:
a set of provider classes
See Also:
Provider, MessageBodyReader, MessageBodyWriter, ContextResolver, ExceptionMapper

getMediaTypeMappings

public java.util.Map<java.lang.String,MediaType> getMediaTypeMappings()
Get a map of file extension to media type. This is used to drive URI-based content negotiation such that, e.g.:
GET /resource.atom

is equivalent to:

GET /resource
 Accept: application/atom+xml

The default implementation returns an empty map.

Returns:
a map of file extension to media type

getLanguageMappings

public java.util.Map<java.lang.String,java.lang.String> getLanguageMappings()
Get a map of file extension to language. This is used to drive URI-based content negotiation such that, e.g.:
GET /resource.english

is equivalent to:

GET /resource
 Accept-Language: en

The default implementation returns an empty map.

Returns:
a map of file extension to language


Copyright © 2008. All Rights Reserved.