public enum JaxRSFeature extends Enum<JaxRSFeature> implements ConfigFeature
Enum Constant and Description |
---|
ADD_NO_SNIFF_HEADER
Feature that can be enabled to make provider automatically
add "nosniff" (see
this entry
for details
|
ALLOW_EMPTY_INPUT
Feature related to
Issue #49:
whether empty input is considered legal or not.
|
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). |
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). |
DYNAMIC_OBJECT_MAPPER_LOOKUP
Feature that may be enabled to force dynamic lookup of
ObjectMapper
via JAX-RS Provider interface, regardless of whether MapperConfigurator |
Modifier and Type | Method and Description |
---|---|
static int |
collectDefaults() |
boolean |
enabledByDefault()
Accessor for checking whether this feature is enabled by default.
|
boolean |
enabledIn(int flags)
Convenience method for checking whether feature is enabled in given bitmask
|
int |
getMask()
Returns bit mask for this feature instance
|
static JaxRSFeature |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JaxRSFeature[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JaxRSFeature ALLOW_EMPTY_INPUT
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.
public static final JaxRSFeature ADD_NO_SNIFF_HEADER
Feature is disabled by default.
public static final JaxRSFeature DYNAMIC_OBJECT_MAPPER_LOOKUP
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
CACHE_ENDPOINT_READERS
and CACHE_ENDPOINT_WRITERS
since caching would prevent lookups.
Feature is disabled by default.
public static final JaxRSFeature CACHE_ENDPOINT_READERS
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.
public static final JaxRSFeature CACHE_ENDPOINT_WRITERS
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.
public static JaxRSFeature[] values()
for (JaxRSFeature c : JaxRSFeature.values()) System.out.println(c);
public static JaxRSFeature valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static int collectDefaults()
public boolean enabledByDefault()
ConfigFeature
enabledByDefault
in interface ConfigFeature
public int getMask()
ConfigFeature
getMask
in interface ConfigFeature
public boolean enabledIn(int flags)
ConfigFeature
enabledIn
in interface ConfigFeature
Copyright © 2019 JBoss by Red Hat. All rights reserved.