Top Description Fields Constructors Methods
com.fasterxml.jackson.jaxrs.cfg

public final Enum JaxRSFeature

extends Enum<JaxRSFeature>
implements ConfigFeature
Class Inheritance
All Implemented Interfaces
com.fasterxml.jackson.databind.cfg.ConfigFeature
Imports
com.fasterxml.jackson.databind.cfg.ConfigFeature

Enumeration that defines simple on/off features that can be used on all Jackson JAX-RS providers, regardless of underlying data format.

Field Summary

Modifier and TypeField and Description
private final boolean
public static final JaxRSFeature
ADD_NO_SNIFF_HEADER

Feature that can be enabled to make provider automatically add "nosniff" (see this entry for details

Feature is disabled by default.

public static final JaxRSFeature
ALLOW_EMPTY_INPUT

Feature related to Issue #49: whether empty input is considered legal or not.

public static final JaxRSFeature
CACHE_ENDPOINT_READERS

[jaxrs-providers#86]: Feature that determines whether provider will cache endpoint definitions for reading or not (including caching of actual ObjectReader to use).

public static final JaxRSFeature
CACHE_ENDPOINT_WRITERS

[jaxrs-providers#86]: Feature that determines whether provider will cache endpoint definitions for writing or not (including caching of actual ObjectWriter to use).

public static final JaxRSFeature
DYNAMIC_OBJECT_MAPPER_LOOKUP

Feature that may be enabled to force dynamic lookup of ObjectMapper via JAX-RS Provider interface, regardless of whether MapperConfigurator has explicitly configured mapper or not; if disabled, static configuration will take precedence.

public static final JaxRSFeature
READ_FULL_STREAM

For HTTP keep-alive or multipart content to work correctly, Jackson must read the entire HTTP input stream up until reading EOF (-1).

Constructor Summary

AccessConstructor and Description
private
JaxRSFeature(boolean defaultState)

Method Summary

Modifier and TypeMethod and Description
public static int
public boolean
enabledByDefault()

Implements com.fasterxml.jackson.databind.cfg.ConfigFeature.enabledByDefault.

Accessor for checking whether this feature is enabled by default.

public boolean
enabledIn(int flags)

Implements com.fasterxml.jackson.databind.cfg.ConfigFeature.enabledIn.

Convenience method for checking whether feature is enabled in given bitmask

public int
getMask()

Implements com.fasterxml.jackson.databind.cfg.ConfigFeature.getMask.

Returns bit mask for this feature instance

public static JaxRSFeature
public static JaxRSFeature[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

_defaultStateback to summary
private final boolean _defaultState
ADD_NO_SNIFF_HEADERback to summary
public static final JaxRSFeature ADD_NO_SNIFF_HEADER

Feature that can be enabled to make provider automatically add "nosniff" (see this entry for details

Feature is disabled by default.

ALLOW_EMPTY_INPUTback to summary
public static final JaxRSFeature ALLOW_EMPTY_INPUT

Feature related to Issue #49: whether empty input is considered legal or not. If set to true, empty content is allowed and will be read as Java 'null': if false, an java.io.IOException will be thrown.

Note

in case of JAX-RS 2.0, specific exception will be javax.ws.rs.core.NoContentException; but this is not defined in JAX-RS 1.x.

CACHE_ENDPOINT_READERSback to summary
public static final JaxRSFeature CACHE_ENDPOINT_READERS

[jaxrs-providers#86]: Feature that determines whether provider will cache endpoint definitions for reading or not (including caching of actual ObjectReader to use). Feature may be disabled if reconfiguration or alternate isntance of ObjectMapper is needed.

Note that disabling of the feature may add significant amount of overhead for processing.

Feature is enabled by default.

Since
2.8
CACHE_ENDPOINT_WRITERSback to summary
public static final JaxRSFeature CACHE_ENDPOINT_WRITERS

[jaxrs-providers#86]: Feature that determines whether provider will cache endpoint definitions for writing or not (including caching of actual ObjectWriter to use). Feature may be disabled if reconfiguration or alternate isntance of ObjectMapper is needed.

Note that disabling of the feature may add significant amount of overhead for processing.

Feature is enabled by default.

Since
2.8
DYNAMIC_OBJECT_MAPPER_LOOKUPback to summary
public static final JaxRSFeature DYNAMIC_OBJECT_MAPPER_LOOKUP

Feature that may be enabled to force dynamic lookup of ObjectMapper via JAX-RS Provider interface, regardless of whether MapperConfigurator has explicitly configured mapper or not; if disabled, static configuration will take precedence. Note that if this feature is enabled, it typically makes sense to also disable JaxRSFeature#CACHE_ENDPOINT_READERS and JaxRSFeature#CACHE_ENDPOINT_WRITERS since caching would prevent lookups.

Feature is disabled by default.

Since
2.8
READ_FULL_STREAMback to summary
public static final JaxRSFeature READ_FULL_STREAM

For HTTP keep-alive or multipart content to work correctly, Jackson must read the entire HTTP input stream up until reading EOF (-1). Issue #108 If set to true, always consume all input content. This has a side-effect of failing on trailing content.

Feature is enabled by default. Note that this means that behavior in earlier versions (2.14 and before) differs from 2.15 and later.

Since
2.15

Constructor Detail

JaxRSFeatureback to summary
private JaxRSFeature(boolean defaultState)

Method Detail

collectDefaultsback to summary
public static int collectDefaults()
enabledByDefaultback to summary
public boolean enabledByDefault()

Implements com.fasterxml.jackson.databind.cfg.ConfigFeature.enabledByDefault.

Doc from com.fasterxml.jackson.databind.cfg.ConfigFeature.enabledByDefault.

Accessor for checking whether this feature is enabled by default.

Annotations
@Override
enabledInback to summary
public boolean enabledIn(int flags)

Implements com.fasterxml.jackson.databind.cfg.ConfigFeature.enabledIn.

Doc from com.fasterxml.jackson.databind.cfg.ConfigFeature.enabledIn.

Convenience method for checking whether feature is enabled in given bitmask

Annotations
@Override
getMaskback to summary
public int getMask()

Implements com.fasterxml.jackson.databind.cfg.ConfigFeature.getMask.

Doc from com.fasterxml.jackson.databind.cfg.ConfigFeature.getMask.

Returns bit mask for this feature instance

Annotations
@Override
valueOfback to summary
public static JaxRSFeature valueOf(String name)
valuesback to summary
public static JaxRSFeature[] values()