- Type Parameters:
T- type of the context
public interface ContextResolver<T>Contract for a provider that supplies context information to resource classes and other providers. A
ContextResolverimplementation may be annotated with
Producesto restrict the media types for which it will be considered suitable.
ContextResolvercontract must be either programmatically registered in a JAX-RS runtime or must be annotated with
@Providerannotation to be automatically discovered by the JAX-RS runtime during a provider scanning phase.
- See Also:
T getContext(java.lang.Class<?> type)Get a context of type
Tthat is applicable to the supplied type.
type- the class of object for which a context is desired
- a context for the supplied type or
nullif a context for the supplied type is not available from this provider.