Class JsonProviderFeature
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.JsonProviderFeature
- All Implemented Interfaces:
javax.ws.rs.core.Feature
A JAX-RS
Feature that registers custom MOXy JSON providers
for handling serialization and deserialization of JSON with or without
root elements.
This feature disables MOXy's automatic provider discovery to ensure
that the custom providers IncludeRootJSONProvider and
ExcludeRootJSONProvider are used explicitly with defined priorities.
Configuration details:
- Registers
IncludeRootJSONProviderwith priority2001. - Registers
ExcludeRootJSONProviderwith priority2002.
- See Also:
-
IncludeRootJSONProviderExcludeRootJSONProviderCommonProperties.MOXY_JSON_FEATURE_DISABLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanconfigure(javax.ws.rs.core.FeatureContext context) Configures the feature by registering the custom JSON providers.
-
Constructor Details
-
JsonProviderFeature
public JsonProviderFeature()Do not use default constructor.
-
-
Method Details
-
configure
public boolean configure(javax.ws.rs.core.FeatureContext context) Configures the feature by registering the custom JSON providers.- Specified by:
configurein interfacejavax.ws.rs.core.Feature- Parameters:
context- theFeatureContextprovided by the JAX-RS runtime- Returns:
trueto indicate that the feature was successfully configured
-