deprecated.javax.ws.rs
Interface DynamicBinder<T>

All Known Implementing Classes:
RolesAllowedDynamicBinder

public interface DynamicBinder<T>

TODO remove.


Method Summary
 T getBoundProvider(ResourceInfo resourceInfo)
          Get the filter or interceptor instance or class that should be bound to the particular resource method.
 

Method Detail

getBoundProvider

T getBoundProvider(ResourceInfo resourceInfo)
Get the filter or interceptor instance or class that should be bound to the particular resource method. May return null.

The returned provider instance or class is 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 is ignored and a warning message is logged.

If the returned object is a Class<P>, JAX-RS runtime will resolve the class to an instance of type P by first looking at the already registered provider instances. If there is already a provider instance of the class registered, the JAX-RS runtime will use it, otherwise a new provider instance of the class will be instantiated, injected and registered by the JAX-RS runtime.

In case the resolving the returned provider class to an instance fails for any reason, the dynamically bound provider class is ignored and a warning message is logged.

The method is called during a (sub)resource method discovery phase (typically once per each discovered (sub)resource method) to return a filter instance that should be bound to a particular (sub)resource method identified by the supplied resource information.

Parameters:
resourceInfo - resource class and method information.
Returns:
a filter or interceptor instance that should be dynamically bound to the (sub)resource method or null otherwise.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.