Interface DynamicFeature
Providers implementing this interface MAY be annotated with @Provider
annotation
in order to be discovered by JAX-RS runtime when scanning for resources and providers. This provider types is
supported only as part of the Server API.
- Since:
- 2.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(ResourceInfo resourceInfo, FeatureContext context) A callback method called by the JAX-RS runtime during the application deployment to register provider instances or classes in aruntime configuration
scope of a particularresource or sub-resource method
; i.e.
-
Method Details
-
configure
A callback method called by the JAX-RS runtime during the application deployment to register provider instances or classes in aruntime configuration
scope of a particularresource or sub-resource method
; i.e. the providers that should be dynamically bound to the method.The registered provider instances or classes are expected to be implementing one or more of the following interfaces:
A provider instance or class that does not implement any of the interfaces above may be ignored by the JAX-RS implementation. In such case a
warning
message must be logged. JAX-RS implementations may support additional provider contracts that can be registered using a dynamic feature concept.Conceptually, this callback method is called during a
resource or sub-resource method
discovery phase (typically once per each discovered resource or sub-resource method) to register provider instances or classes in aconfiguration
scope of each particular method identified by the suppliedresource information
. The responsibility of the feature is to properly update the suppliedconfiguration
context.- Parameters:
resourceInfo
- resource class and method information.context
- configurable resource or sub-resource method-level runtime context associated with theresourceInfo
in which the feature
-