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,MediaType> getExtensionMappings()
          Get a map of file extension to media type.
 java.util.Map<java.lang.String,java.lang.String> getLanguageMappings()
          Get a map of file extension to language.
 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. Classes not annotated with Path will be ignored.

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. Classes not implementing an extension interface (one or more of MessageBodyReader, MessageBodyWriter or ContextResolver) will be ignored. The default implementation returns an empty set.

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

getExtensionMappings

public java.util.Map<java.lang.String,MediaType> getExtensionMappings()
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