Class XmlJAXBContextFinder
- java.lang.Object
-
- org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBContextFinder
-
- org.jboss.resteasy.plugins.providers.jaxb.XmlJAXBContextFinder
-
- All Implemented Interfaces:
javax.ws.rs.ext.ContextResolver<JAXBContextFinder>,JAXBContextFinder
- Direct Known Subclasses:
FastinfoSetJAXBContextFinder
@Provider @Produces({"text/xml","text/*+xml","application/xml","application/*+xml"}) public class XmlJAXBContextFinder extends AbstractJAXBContextFinder implements javax.ws.rs.ext.ContextResolver<JAXBContextFinder>- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBContextFinder
AbstractJAXBContextFinder.CacheKey
-
-
Field Summary
-
Fields inherited from class org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBContextFinder
OBJECT_FACTORY_NAME, providers
-
-
Constructor Summary
Constructors Constructor Description XmlJAXBContextFinder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JAXBContextcreateContextObject(Annotation[] parameterAnnotations, Class... classes)protected JAXBContextcreateContextObject(Annotation[] parameterAnnotations, String contextPath)JAXBContextfindCacheContext(javax.ws.rs.core.MediaType mediaType, Annotation[] paraAnnotations, Class... classes)This method creates a JAXBContext from a collection of classes.JAXBContextfindCachedContext(Class type, javax.ws.rs.core.MediaType mediaType, Annotation[] parameterAnnotations)This method with find a JAXBContext for one type.JAXBContextfindCacheXmlTypeContext(javax.ws.rs.core.MediaType mediaType, Annotation[] paraAnnotations, Class... classes)This method will find a JAXBContext from a set of XmlTypes that use an ObjectFactory for creation (i.e.-
Methods inherited from class org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBContextFinder
createContext, createXmlTypeContext, findDefaultObjectFactoryClass, findProvidedJAXBContext, getContext, getPackageName
-
-
-
-
Method Detail
-
findCachedContext
public JAXBContext findCachedContext(Class type, javax.ws.rs.core.MediaType mediaType, Annotation[] parameterAnnotations) throws JAXBException
Description copied from interface:JAXBContextFinderThis method with find a JAXBContext for one type. The user can override the cache by defining a ContextResolver<JAXBContext> for the given media type.- Specified by:
findCachedContextin interfaceJAXBContextFinder- Parameters:
type- typemediaType- media typeparameterAnnotations- annotations- Returns:
JAXBContext- Throws:
JAXBException- jaxb exception
-
createContextObject
protected JAXBContext createContextObject(Annotation[] parameterAnnotations, Class... classes) throws JAXBException
- Specified by:
createContextObjectin classAbstractJAXBContextFinder- Throws:
JAXBException
-
createContextObject
protected JAXBContext createContextObject(Annotation[] parameterAnnotations, String contextPath) throws JAXBException
- Specified by:
createContextObjectin classAbstractJAXBContextFinder- Throws:
JAXBException
-
findCacheContext
public JAXBContext findCacheContext(javax.ws.rs.core.MediaType mediaType, Annotation[] paraAnnotations, Class... classes) throws JAXBException
Description copied from interface:JAXBContextFinderThis method creates a JAXBContext from a collection of classes. Unlike the other findCachedContext() method, the user cannot override the JAXBContext created.- Specified by:
findCacheContextin interfaceJAXBContextFinder- Parameters:
mediaType- media typeparaAnnotations- annotationsclasses- classes- Returns:
JAXBContext- Throws:
JAXBException- jaxb exception
-
findCacheXmlTypeContext
public JAXBContext findCacheXmlTypeContext(javax.ws.rs.core.MediaType mediaType, Annotation[] paraAnnotations, Class... classes) throws JAXBException
Description copied from interface:JAXBContextFinderThis method will find a JAXBContext from a set of XmlTypes that use an ObjectFactory for creation (i.e. from xjc).- Specified by:
findCacheXmlTypeContextin interfaceJAXBContextFinder- Parameters:
mediaType- media typeparaAnnotations- annotationsclasses- classes- Returns:
JAXBContext- Throws:
JAXBException- jaxb exception
-
-