@Provider
@Produces(value={"text/xml","text/*+xml","application/xml","application/*+xml"})
public class XmlJAXBContextFinder
extends AbstractJAXBContextFinder
implements javax.ws.rs.ext.ContextResolver<JAXBContextFinder>
AbstractJAXBContextFinder.CacheKey| Modifier and Type | Field and Description |
|---|---|
private java.util.concurrent.ConcurrentHashMap<java.lang.Class<?>,javax.xml.bind.JAXBContext> |
cache |
private java.util.concurrent.ConcurrentHashMap<AbstractJAXBContextFinder.CacheKey,javax.xml.bind.JAXBContext> |
collectionCache |
private java.util.concurrent.ConcurrentHashMap<AbstractJAXBContextFinder.CacheKey,javax.xml.bind.JAXBContext> |
xmlTypeCollectionCache |
OBJECT_FACTORY_NAME, providers| Constructor and Description |
|---|
XmlJAXBContextFinder() |
| Modifier and Type | Method and Description |
|---|---|
protected javax.xml.bind.JAXBContext |
createContextObject(java.lang.annotation.Annotation[] parameterAnnotations,
java.lang.Class... classes) |
protected javax.xml.bind.JAXBContext |
createContextObject(java.lang.annotation.Annotation[] parameterAnnotations,
java.lang.String contextPath) |
javax.xml.bind.JAXBContext |
findCacheContext(javax.ws.rs.core.MediaType mediaType,
java.lang.annotation.Annotation[] paraAnnotations,
java.lang.Class... classes)
This method creates a JAXBContext from a collection of classes.
|
javax.xml.bind.JAXBContext |
findCachedContext(java.lang.Class type,
javax.ws.rs.core.MediaType mediaType,
java.lang.annotation.Annotation[] parameterAnnotations)
This method with find a JAXBContext for one type.
|
javax.xml.bind.JAXBContext |
findCacheXmlTypeContext(javax.ws.rs.core.MediaType mediaType,
java.lang.annotation.Annotation[] paraAnnotations,
java.lang.Class... classes)
This method will find a JAXBContext from a set of XmlTypes that use an ObjectFactory for creation (i.e.
|
createContext, createXmlTypeContext, findDefaultObjectFactoryClass, findProvidedJAXBContext, getContext, getPackageNameprivate java.util.concurrent.ConcurrentHashMap<java.lang.Class<?>,javax.xml.bind.JAXBContext> cache
private java.util.concurrent.ConcurrentHashMap<AbstractJAXBContextFinder.CacheKey,javax.xml.bind.JAXBContext> collectionCache
private java.util.concurrent.ConcurrentHashMap<AbstractJAXBContextFinder.CacheKey,javax.xml.bind.JAXBContext> xmlTypeCollectionCache
public javax.xml.bind.JAXBContext findCachedContext(java.lang.Class type,
javax.ws.rs.core.MediaType mediaType,
java.lang.annotation.Annotation[] parameterAnnotations)
throws javax.xml.bind.JAXBException
JAXBContextFinderfindCachedContext in interface JAXBContextFinderjavax.xml.bind.JAXBExceptionprotected javax.xml.bind.JAXBContext createContextObject(java.lang.annotation.Annotation[] parameterAnnotations,
java.lang.Class... classes)
throws javax.xml.bind.JAXBException
createContextObject in class AbstractJAXBContextFinderjavax.xml.bind.JAXBExceptionprotected javax.xml.bind.JAXBContext createContextObject(java.lang.annotation.Annotation[] parameterAnnotations,
java.lang.String contextPath)
throws javax.xml.bind.JAXBException
createContextObject in class AbstractJAXBContextFinderjavax.xml.bind.JAXBExceptionpublic javax.xml.bind.JAXBContext findCacheContext(javax.ws.rs.core.MediaType mediaType,
java.lang.annotation.Annotation[] paraAnnotations,
java.lang.Class... classes)
throws javax.xml.bind.JAXBException
JAXBContextFinderfindCacheContext in interface JAXBContextFinderjavax.xml.bind.JAXBExceptionpublic javax.xml.bind.JAXBContext findCacheXmlTypeContext(javax.ws.rs.core.MediaType mediaType,
java.lang.annotation.Annotation[] paraAnnotations,
java.lang.Class... classes)
throws javax.xml.bind.JAXBException
JAXBContextFinderfindCacheXmlTypeContext in interface JAXBContextFinderjavax.xml.bind.JAXBException