Enum Class JaxRSFeature
- All Implemented Interfaces:
com.fasterxml.jackson.databind.cfg.ConfigFeature
,Serializable
,Comparable<JaxRSFeature>
,java.lang.constant.Constable
public enum JaxRSFeature
extends Enum<JaxRSFeature>
implements 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionFeature that can be enabled to make provider automatically add "nosniff" (see this entry for detailsFeature related to Issue #49: whether empty input is considered legal or not.[jaxrs-providers#86]: Feature that determines whether provider will cache endpoint definitions for reading or not (including caching of actualObjectReader
to use).[jaxrs-providers#86]: Feature that determines whether provider will cache endpoint definitions for writing or not (including caching of actualObjectWriter
to use).Feature that may be enabled to force dynamic lookup ofObjectMapper
via JAX-RS Provider interface, regardless of whetherMapperConfigurator
has explicitly configured mapper or not; if disabled, static configuration will take precedence.For HTTP keep-alive or multipart content to work correctly, Jackson must read the entire HTTP input stream up until reading EOF (-1). -
Method Summary
Modifier and TypeMethodDescriptionstatic int
boolean
boolean
enabledIn
(int flags) int
getMask()
static JaxRSFeature
Returns the enum constant of this class with the specified name.static JaxRSFeature[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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, anIOException
will be thrown.NOTE: in case of JAX-RS 2.0, specific exception will be
jakarta.ws.rs.core.NoContentException
; but this is not defined in JAX-RS 1.x. -
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
-
ADD_NO_SNIFF_HEADER
Feature that can be enabled to make provider automatically add "nosniff" (see this entry for detailsFeature is disabled by default.
-
DYNAMIC_OBJECT_MAPPER_LOOKUP
Feature that may be enabled to force dynamic lookup ofObjectMapper
via JAX-RS Provider interface, regardless of whetherMapperConfigurator
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 disableCACHE_ENDPOINT_READERS
andCACHE_ENDPOINT_WRITERS
since caching would prevent lookups.Feature is disabled by default.
- Since:
- 2.8
-
CACHE_ENDPOINT_READERS
[jaxrs-providers#86]: Feature that determines whether provider will cache endpoint definitions for reading or not (including caching of actualObjectReader
to use). Feature may be disabled if reconfiguration or alternate isntance ofObjectMapper
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_WRITERS
[jaxrs-providers#86]: Feature that determines whether provider will cache endpoint definitions for writing or not (including caching of actualObjectWriter
to use). Feature may be disabled if reconfiguration or alternate isntance ofObjectMapper
is needed.Note that disabling of the feature may add significant amount of overhead for processing.
Feature is enabled by default.
- Since:
- 2.8
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
collectDefaults
public static int collectDefaults() -
enabledByDefault
public boolean enabledByDefault()- Specified by:
enabledByDefault
in interfacecom.fasterxml.jackson.databind.cfg.ConfigFeature
-
getMask
public int getMask()- Specified by:
getMask
in interfacecom.fasterxml.jackson.databind.cfg.ConfigFeature
-
enabledIn
public boolean enabledIn(int flags) - Specified by:
enabledIn
in interfacecom.fasterxml.jackson.databind.cfg.ConfigFeature
-