Enum JakartaRSFeature
- java.lang.Object
-
- java.lang.Enum<JakartaRSFeature>
-
- com.fasterxml.jackson.jakarta.rs.cfg.JakartaRSFeature
-
- All Implemented Interfaces:
com.fasterxml.jackson.databind.cfg.ConfigFeature
,Serializable
,Comparable<JakartaRSFeature>
public enum JakartaRSFeature extends Enum<JakartaRSFeature> implements com.fasterxml.jackson.databind.cfg.ConfigFeature
Enumeration that defines simple on/off features that can be used on all Jackson Jakarta-RS providers, regardless of underlying data format.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADD_NO_SNIFF_HEADER
Feature that can be enabled to make provider automatically add "nosniff" (see this entry for detailsALLOW_EMPTY_INPUT
Feature to define whether empty input is considered legal or not.CACHE_ENDPOINT_READERS
Feature that determines whether provider will cache endpoint definitions for reading or not (including caching of actualObjectReader
to use).CACHE_ENDPOINT_WRITERS
Feature that determines whether provider will cache endpoint definitions for writing or not (including caching of actualObjectWriter
to use).DYNAMIC_OBJECT_MAPPER_LOOKUP
Feature that may be enabled to force dynamic lookup ofObjectMapper
via Jakarta-RS Provider interface, regardless of whetherMapperConfigurator
has explicitly configured mapper or not; if disabled, static configuration will take precedence.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
collectDefaults()
boolean
enabledByDefault()
boolean
enabledIn(int flags)
int
getMask()
static JakartaRSFeature
valueOf(String name)
Returns the enum constant of this type with the specified name.static JakartaRSFeature[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALLOW_EMPTY_INPUT
public static final JakartaRSFeature ALLOW_EMPTY_INPUT
Feature to define 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 Jakarta-RS 2.0, specific exception will be
jakarta.ws.rs.core.NoContentException
,
-
ADD_NO_SNIFF_HEADER
public static final JakartaRSFeature 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
public static final JakartaRSFeature DYNAMIC_OBJECT_MAPPER_LOOKUP
Feature that may be enabled to force dynamic lookup ofObjectMapper
via Jakarta-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.
-
CACHE_ENDPOINT_READERS
public static final JakartaRSFeature CACHE_ENDPOINT_READERS
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 instance ofObjectMapper
is needed.Note that disabling of the feature may add significant amount of overhead for processing.
Feature is enabled by default.
-
CACHE_ENDPOINT_WRITERS
public static final JakartaRSFeature CACHE_ENDPOINT_WRITERS
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 instance ofObjectMapper
is needed.Note that disabling of the feature may add significant amount of overhead for processing.
Feature is enabled by default.
-
-
Method Detail
-
values
public static JakartaRSFeature[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JakartaRSFeature c : JakartaRSFeature.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JakartaRSFeature valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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
-
-