Class JaxbStringReaderProvider

java.lang.Object
org.glassfish.jersey.jaxb.internal.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 (marek.potociar at oracle.com)
  • Constructor Details

    • JaxbStringReaderProvider

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

    • getUnmarshaller

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

      protected JAXBContext getStoredJAXBContext(Class type) throws 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:
      JAXBException - in case JAXB context retrieval fails.