Class JaxbStringReaderProvider

  • Direct Known Subclasses:
    JaxbStringReaderProvider.RootElementProvider

    public class JaxbStringReaderProvider
    extends Object
    String reader provider producing param converter provider that support conversion of a string value into a JAXB instance.
    Author:
    Paul Sandoz, Marek Potociar
    • Constructor Detail

      • JaxbStringReaderProvider

        public JaxbStringReaderProvider​(jakarta.ws.rs.ext.Providers ps)
        Create JAXB string reader provider.
        Parameters:
        ps - used to obtain JAXBContext and Unmarshaller ContextResolvers
    • Method Detail

      • getUnmarshaller

        protected final jakarta.xml.bind.Unmarshaller getUnmarshaller​(Class type)
                                                               throws jakarta.xml.bind.JAXBException
        Get JAXB unmarshaller for the type.
        Parameters:
        type - Java type to be unmarshalled.
        Returns:
        JAXB unmarshaller for the given type.
        Throws:
        jakarta.xml.bind.JAXBException - in case there's an error retrieving the unmarshaller.
      • getStoredJAXBContext

        protected jakarta.xml.bind.JAXBContext getStoredJAXBContext​(Class type)
                                                             throws jakarta.xml.bind.JAXBException
        Get the stored JAXB context supporting the Java type.
        Parameters:
        type - Java type supported by the stored JAXB context.
        Returns:
        stored JAXB context supporting the Java type.
        Throws:
        jakarta.xml.bind.JAXBException - in case JAXB context retrieval fails.