Class XmlRootElementJaxbProvider

All Implemented Interfaces:
MessageBodyReader<Object>, MessageBodyWriter<Object>
Direct Known Subclasses:
XmlRootElementJaxbProvider.App, XmlRootElementJaxbProvider.General, XmlRootElementJaxbProvider.Text

public abstract class XmlRootElementJaxbProvider extends AbstractRootElementJaxbProvider
Base XML-based message body provider for JAXB root elements and types.
Author:
Paul Sandoz, Marek Potociar
  • Method Details

    • readFrom

      protected Object readFrom(Class<Object> type, MediaType mediaType, jakarta.xml.bind.Unmarshaller u, InputStream entityStream) throws jakarta.xml.bind.JAXBException
      Description copied from class: AbstractRootElementJaxbProvider
      Unmarshal a JAXB type.

      Implementing classes may override this method.

      Overrides:
      readFrom in class AbstractRootElementJaxbProvider
      Parameters:
      type - the JAXB type
      mediaType - the media type
      u - the unmarshaller to use for unmarshalling.
      entityStream - the input stream to unmarshal from.
      Returns:
      an instance of the JAXB type.
      Throws:
      jakarta.xml.bind.JAXBException - in case the JAXB unmarshalling fails.