org.glassfish.jersey.server
Class ServerProperties

java.lang.Object
  extended by org.glassfish.jersey.server.ServerProperties

public final class ServerProperties
extends Object

Jersey server-side configuration properties.

Author:
Marek Potociar (marek.potociar at oracle.com), Martin Matula (martin.matula at oracle.com)

Field Summary
static String BV_DISABLE_VALIDATE_ON_EXECUTABLE_OVERRIDE_CHECK
          A Bean Validation (JSR-349) support customization property.
static String BV_FEATURE_DISABLE
          If true then disable Bean Validation support.
static String BV_SEND_ERROR_IN_RESPONSE
          A Bean Validation (JSR-349) support customization property.
static String FEATURE_AUTO_DISCOVERY_DISABLE
          If true then disable auto discovery on server.
static String HTTP_METHOD_OVERRIDE
          Defines configuration of HTTP method overriding.
static String JSON_PROCESSING_FEATURE_DISABLE
          If true then disable configuration of Json Processing (JSR-353) feature on server.
static String LANGUAGE_MAPPINGS
          Defines mapping of URI extensions to languages.
static String MEDIA_TYPE_MAPPINGS
          Defines mapping of URI extensions to media types.
static String MOXY_JSON_FEATURE_DISABLE
          If true then disable configuration of MOXy Json feature on server.
static String PROVIDER_CLASSNAMES
          Defines one or more class names that implement application-specific resources and providers.
static String PROVIDER_CLASSPATH
          Defines class-path that contains application-specific resources and providers.
static String PROVIDER_PACKAGES
          Defines one or more packages that contain application-specific resources and providers.
static String PROVIDER_SCANNING_RECURSIVE
          Sets the recursion strategy for package scanning.
static String RESOURCE_VALIDATION_DISABLE
          If true then the extensive validation of application resource model is disabled.
static String RESOURCE_VALIDATION_IGNORE_ERRORS
          If true then validation of application resource models does not fail even in case of a fatal validation errors.
static String WADL_FEATURE_DISABLE
          If true then disable WADL generation.
static String WADL_GENERATOR_CONFIG
          If set the wadl generator configuration that provides a WadlGenerator.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROVIDER_PACKAGES

public static final String PROVIDER_PACKAGES
Defines one or more packages that contain application-specific resources and providers. If the property is set, the specified packages will be scanned for JAX-RS root resources (annotated with @Path) and providers (annotated with @Provider).

The property value MUST be an instance of String or String[] array. Each String instance represents one or more package names that MUST be separated only by characters declared in common delimiters: " ,;\n".

A default value is not set.

The name of the configuration property is "jersey.config.server.provider.packages".

See Also:
Constant Field Values

PROVIDER_SCANNING_RECURSIVE

public static final String PROVIDER_SCANNING_RECURSIVE
Sets the recursion strategy for package scanning. The value of true indicates that the list of provided package names should be scanned recursively including any nested packages. Value of false indicates that only packages in the list should be scanned. In such case any nested packages will be ignored.

The property value MUST be an instance of Boolean type or a String convertible to Boolean type.

A default value is true.

The name of the configuration property is "jersey.config.server.provider.scanning.recursive".

See Also:
PROVIDER_PACKAGES, Constant Field Values

PROVIDER_CLASSPATH

public static final String PROVIDER_CLASSPATH
Defines class-path that contains application-specific resources and providers. If the property is set, the specified class-path will be scanned for JAX-RS root resources (annotated with @Path) and providers (annotated with @Provider). Each path element MUST be an absolute or relative directory, or a Jar file. The contents of a directory, including Java class files, jars files and sub-directories are scanned (recursively).

The property value MUST be an instance of String or String[] array. Each String instance represents one or more paths that MUST be separated only by characters declared in common delimiters: " ,;\n".

A default value is not set.

The name of the configuration property is "jersey.config.server.provider.classpath".

See Also:
Constant Field Values

PROVIDER_CLASSNAMES

public static final String PROVIDER_CLASSNAMES
Defines one or more class names that implement application-specific resources and providers. If the property is set, the specified classes will be instantiated and registered as either application JAX-RS root resources (annotated with @Path) or providers (annotated with @Provider).

The property value MUST be an instance of String or String[] array. Each String instance represents one or more class names that MUST be separated only by characters declared in common delimiters: " ,;\n".

A default value is not set.

The name of the configuration property is "jersey.config.server.provider.classnames".

See Also:
Constant Field Values

MEDIA_TYPE_MAPPINGS

public static final String MEDIA_TYPE_MAPPINGS
Defines mapping of URI extensions to media types. The property is used by UriConnegFilter. See it's javadoc for more information on media type mappings.

The property value MUST be an instance of String, String[] or Map<String, MediaType>. Each String instance represents one or more uri-extension-to-media-type map entries separated by a comma (","). Each map entry is a key-value pair separated by a colon (":"). Here is an example of an acceptable String value mapping txt extension to text/plain and xml extension to application/xml:

txt : text/plain, xml : application/xml

A default value is not set.

The name of the configuration property is "jersey.config.server.mediaTypeMappings".

See Also:
Constant Field Values

LANGUAGE_MAPPINGS

public static final String LANGUAGE_MAPPINGS
Defines mapping of URI extensions to languages. The property is used by UriConnegFilter. See it's javadoc for more information on language mappings.

The property value MUST be an instance of String, String[] or Map<String, String>. Each String instance represents one or more uri-extension-to-language map entries separated by a comma (","). Each map entry is a key-value pair separated by a colon (":"). Here is an example of an acceptable String value mapping english extension to "en" value of Content-Language header and french extension to "fr" Content-Language header value:

english : en, french : fr

A default value is not set.

The name of the configuration property is "jersey.config.server.languageMappings".

See Also:
Constant Field Values

HTTP_METHOD_OVERRIDE

public static final String HTTP_METHOD_OVERRIDE
Defines configuration of HTTP method overriding. This property is used by HttpMethodOverrideFilter to determine where it should look for method override information (e.g. request header or query parameters). HttpMethodOverrideFilter.Source enum lists the allowed property values.

The property value must be an instance of String, String[], Source or Source[]. Each String instance represents one or more class names separated by characters declared in common delimiters: " ,;\n".

The default value is "HEADER, QUERY".

The name of the configuration property is "jersey.config.server.httpMethodOverride".

See Also:
Constant Field Values

WADL_GENERATOR_CONFIG

public static final String WADL_GENERATOR_CONFIG
If set the wadl generator configuration that provides a WadlGenerator.

The type of this property must be a subclass or an instance of a subclass of WadlGeneratorConfig.

If this property is not set the default wadl generator will be used for generating wadl.

The name of the configuration property is "jersey.config.server.wadl.generatorConfig".

See Also:
Constant Field Values

WADL_FEATURE_DISABLE

public static final String WADL_FEATURE_DISABLE
If true then disable WADL generation.

By default WADL generation is automatically enabled, if JAXB is present in the classpath and the auto-discovery feature is enabled or if an appropriate feature is enabled.

The default value is false.

The name of the configuration property is "jersey.config.server.wadl.disableWadl".

See Also:
FEATURE_AUTO_DISCOVERY_DISABLE, CommonProperties.FEATURE_AUTO_DISCOVERY_DISABLE, Constant Field Values

BV_FEATURE_DISABLE

public static final String BV_FEATURE_DISABLE
If true then disable Bean Validation support.

By default Bean Validation (JSR-349) is automatically enabled, if org.glassfish.jersey.ext::jersey-bean-validation Jersey module is present in the classpath and the auto-discovery support is not disabled (see FEATURE_AUTO_DISCOVERY_DISABLE) or — in case the Jersey auto-discovery support is disabled — if the org.glassfish.jersey.server.validation.ValidationFeature is explicitly registered in a JAX-RS/Jersey application.

The default value is false.

The name of the configuration property is "jersey.config.beanValidation.disable.server".

See Also:
FEATURE_AUTO_DISCOVERY_DISABLE, CommonProperties.FEATURE_AUTO_DISCOVERY_DISABLE, Constant Field Values

BV_DISABLE_VALIDATE_ON_EXECUTABLE_OVERRIDE_CHECK

public static final String BV_DISABLE_VALIDATE_ON_EXECUTABLE_OVERRIDE_CHECK
A Bean Validation (JSR-349) support customization property. If true the check whether the overriding / implementing methods are annotated with javax.validation.executable.ValidateOnExecution as well as one of their predecessor (in hierarchy) is disabled.

By default this checks is automatically enabled, unless the Bean Validation support is disabled explicitly (see BV_FEATURE_DISABLE).

The default value is false.

The name of the configuration property is "jersey.config.beanValidation.disable.validateOnExecutableCheck.server".

See Also:
javax.validation.executable.ValidateOnExecution, Constant Field Values

BV_SEND_ERROR_IN_RESPONSE

public static final String BV_SEND_ERROR_IN_RESPONSE
A Bean Validation (JSR-349) support customization property. If set to true and Bean Validation support has not been explicitly disabled (see BV_FEATURE_DISABLE), the validation error information will be sent in the entity of the returned Response.

The default value is false. This means that in case of an error response caused by a Bean Validation error, only a status code is sent in the server Response by default.

The name of the configuration property is "jersey.config.beanValidation.enableOutputValidationErrorEntity.server".

See Also:
Constant Field Values

FEATURE_AUTO_DISCOVERY_DISABLE

public static final String FEATURE_AUTO_DISCOVERY_DISABLE
If true then disable auto discovery on server.

By default auto discovery is automatically enabled if global property "jersey.config.disableAutoDiscovery" is not disabled. If set then the server property value overrides the global property value.

The default value is false.

The name of the configuration property is "jersey.config.disableAutoDiscovery.server".

See Also:
CommonProperties.FEATURE_AUTO_DISCOVERY_DISABLE, BV_FEATURE_DISABLE, WADL_FEATURE_DISABLE, Constant Field Values

JSON_PROCESSING_FEATURE_DISABLE

public static final String JSON_PROCESSING_FEATURE_DISABLE
If true then disable configuration of Json Processing (JSR-353) feature on server.

By default Json Processing is automatically enabled if global property "jersey.config.disableJsonProcessing" is not disabled. If set then the server property value overrides the global property value.

The default value is false.

The name of the configuration property is "jersey.config.disableJsonProcessing.server".

See Also:
CommonProperties.JSON_PROCESSING_FEATURE_DISABLE, Constant Field Values

MOXY_JSON_FEATURE_DISABLE

public static final String MOXY_JSON_FEATURE_DISABLE
If true then disable configuration of MOXy Json feature on server.

By default MOXy Json is automatically enabled if global property "jersey.config.disableMoxyJson" is not disabled. If set then the server property value overrides the global property value.

The default value is false.

The name of the configuration property is "jersey.config.disableMoxyJson.server".

See Also:
CommonProperties.MOXY_JSON_FEATURE_DISABLE, Constant Field Values

RESOURCE_VALIDATION_DISABLE

public static final String RESOURCE_VALIDATION_DISABLE
If true then the extensive validation of application resource model is disabled. This impacts both the validation of root resources during deployment as well as validation of any sub resources returned from sub-resource locators.

This option is typically used for performance purpose. Note however that in case the application resource models are not valid, setting the property to true can cause invalid behaviour and hard to diagnose issues at runtime.

By default the resource validation is run on models which are created either from the supplied resource class or instance as well as on any directly provided resource models.

The default value is false.

The name of the configuration property is "jersey.config.server.resource.validation.disable".

See Also:
RESOURCE_VALIDATION_IGNORE_ERRORS, Constant Field Values

RESOURCE_VALIDATION_IGNORE_ERRORS

public static final String RESOURCE_VALIDATION_IGNORE_ERRORS
If true then validation of application resource models does not fail even in case of a fatal validation errors. All resource model validation issues are still output to the log, unless the resource model validation is completely disabled (see RESOURCE_VALIDATION_DISABLE). This impacts both the validation of root resources during deployment as well as validation of any sub resources returned from sub-resource locators. The option is typically used during development and testing.

The default value is false.

The name of the configuration property is "jersey.config.server.resource.validation.ignoreErrors".

See Also:
RESOURCE_VALIDATION_DISABLE, Constant Field Values


Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.