Interface Feature
public interface Feature
 A Feature is a special type of JAX-RS configuration meta-provider. Once a feature is registered, its
 configure(FeatureContext) method is invoked during JAX-RS runtime configuration and bootstrapping phase
 allowing the feature to further configure the runtime context in which it has been registered. From within the
 invoked configure(...) method a feature may provide additional runtime configuration for the facility or
 conceptual domain it represents, such as registering additional contract providers, including nested features and/or
 specifying domain-specific properties.
 
 Features implementing this interface MAY be annotated with the @Provider
 annotation in order to be discovered by the JAX-RS runtime when scanning for resources and providers. Please note
 that this will only work for server side features. Features for the JAX-RS client must be registered
 programmatically.
 
- Since:
- 2.0
- Author:
- Marek Potociar
- 
Method SummaryModifier and Type Method Description booleanconfigure(FeatureContext context)A call-back method called when the feature is to be enabled in a given runtime configuration scope.
- 
Method Details- 
configureA call-back method called when the feature is to be enabled in a given runtime configuration scope. The responsibility of the feature is to properly update the supplied runtime configuration context and returntrueif the feature was successfully enabled orfalseotherwise.Note that under some circumstances the feature may decide not to enable itself, which is indicated by returning false. In such case the configuration context does not add the feature to the collection of enabled features and a subsequent call toConfiguration.isEnabled(Feature)orConfiguration.isEnabled(Class)method would returnfalse.- Parameters:
- context- configurable context in which the feature should be enabled.
- Returns:
- trueif the feature was successfully enabled,- falseotherwise.
 
 
-