javax.ws.rs.ext.ContextResolver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jersey-bundle Show documentation
Show all versions of jersey-bundle Show documentation
A bundle containing code of all jar-based modules that provide
JAX-RS and Jersey-related features. Such a bundle is *only intended* for
developers that do not use Maven's dependency system.
The bundle does not include code for contributes, tests and samples.
/*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the "License"). You may not use this file except
* in compliance with the License.
*
* You can obtain a copy of the license at
* http://www.opensource.org/licenses/cddl1.php
* See the License for the specific language governing
* permissions and limitations under the License.
*/
package javax.ws.rs.ext;
/**
* Contract for a provider that supplies context information to resource
* classes and other providers. An implementation of this interface must be
* annotated with {@link Provider}.
*
* A ContextResolver
implementation may be annotated
* with {@link javax.ws.rs.Produces} to restrict the media types for
* which it will be considered suitable.
*
* @see javax.ws.rs.core.Context
* @see Providers#getContextResolver(java.lang.Class, javax.ws.rs.core.MediaType)
* @see Provider
* @see javax.ws.rs.Produces
*/
public interface ContextResolver {
/**
* Get a context of type T
that is applicable to the supplied
* type.
* @param type the class of object for which a context is desired
* @return a context for the supplied type or null
if a
* context for the supplied type is not available from this provider.
*/
T getContext(Class> type);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy