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.
  • Field Details

    • jaxbContexts

      private static final Map<Class,JAXBContext> jaxbContexts
    • mtContext

      private final Value<javax.ws.rs.ext.ContextResolver<JAXBContext>> mtContext
    • mtUnmarshaller

      private final Value<javax.ws.rs.ext.ContextResolver<Unmarshaller>> mtUnmarshaller
  • 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.
    • getJAXBContext

      private JAXBContext getJAXBContext(Class type) throws JAXBException
      Throws:
      JAXBException
    • 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.