Class XmlJAXBContextFinder

    • Field Detail

      • cache

        private java.util.concurrent.ConcurrentHashMap<java.lang.Class<?>,​javax.xml.bind.JAXBContext> cache
    • Constructor Detail

      • XmlJAXBContextFinder

        public XmlJAXBContextFinder()
    • Method Detail

      • findCachedContext

        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
        Description copied from interface: JAXBContextFinder
        This method with find a JAXBContext for one type. The user can override the cache by defining a ContextResolver for the given media type.
        Specified by:
        findCachedContext in interface JAXBContextFinder
        Returns:
        Throws:
        javax.xml.bind.JAXBException
      • createContextObject

        protected javax.xml.bind.JAXBContext createContextObject​(java.lang.annotation.Annotation[] parameterAnnotations,
                                                                 java.lang.Class... classes)
                                                          throws javax.xml.bind.JAXBException
        Specified by:
        createContextObject in class AbstractJAXBContextFinder
        Throws:
        javax.xml.bind.JAXBException
      • createContextObject

        protected javax.xml.bind.JAXBContext createContextObject​(java.lang.annotation.Annotation[] parameterAnnotations,
                                                                 java.lang.String contextPath)
                                                          throws javax.xml.bind.JAXBException
        Specified by:
        createContextObject in class AbstractJAXBContextFinder
        Throws:
        javax.xml.bind.JAXBException
      • findCacheContext

        public 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
        Description copied from interface: JAXBContextFinder
        This method creates a JAXBContext from a collection of classes. Unlike the other findCachedContext() method, the user cannot override the JAXBContext created.
        Specified by:
        findCacheContext in interface JAXBContextFinder
        Returns:
        Throws:
        javax.xml.bind.JAXBException
      • findCacheXmlTypeContext

        public 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
        Description copied from interface: JAXBContextFinder
        This method will find a JAXBContext from a set of XmlTypes that use an ObjectFactory for creation (i.e. from xjc)
        Specified by:
        findCacheXmlTypeContext in interface JAXBContextFinder
        Returns:
        Throws:
        javax.xml.bind.JAXBException