javax.ws.rs.container
Interface DynamicFeature

All Known Implementing Classes:
CacheControlFeature, ClientContentEncodingAnnotationFeature, ClientDigitalSigningHeaderDecoratorFeature, ClientDigitalVerificationHeaderDecoratorFeature, RoleBasedSecurityFeature, ServerContentEncodingAnnotationFeature, ServerDigitalSigningHeaderDecoratorFeature, ServerDigitalVerificationHeaderDecoratorFeature

public interface DynamicFeature

A JAX-RS provider for dynamic registration of post-matching providers during a JAX-RS application setup at deployment time. Dynamic feature provider is used by JAX-RS runtime to register providers that shall be applied to a particular resource class and method and overrides any annotation-based binding definitions defined on any registered resource filter or interceptor instance.

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
Author:
Santiago Pericas-Geertsen, Bill Burke, Marek Potociar
See Also:
NameBinding

Method Summary
 void configure(ResourceInfo resourceInfo, Configurable configurable)
          A callback method called by the JAX-RS runtime during the application deployment to register provider instances or classes in a configurable scope of a particular resource or sub-resource method; i.e.
 

Method Detail

configure

void configure(ResourceInfo resourceInfo,
               Configurable configurable)
A callback method called by the JAX-RS runtime during the application deployment to register provider instances or classes in a configurable scope of a particular resource 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 a configurable scope of each particular method identified by the supplied resource information. The responsibility of the feature is to properly update the supplied configurable context.

Parameters:
resourceInfo - resource class and method information.
configurable - a resource or sub-resource method-level configurable context associated with the resourceInfo in which the feature should be enabled.


Copyright © 2013. All Rights Reserved.