Class ValidatingMessageBodyReader<T>

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<T>

    @Provider
    public class ValidatingMessageBodyReader<T>
    extends Object
    implements javax.ws.rs.ext.MessageBodyReader<T>
    • Field Detail

      • providers

        @Context
        protected javax.ws.rs.ext.Providers providers
    • Constructor Detail

      • ValidatingMessageBodyReader

        public ValidatingMessageBodyReader()
    • Method Detail

      • isReadable

        public boolean isReadable​(Class<?> clazz,
                                  Type type,
                                  Annotation[] annotations,
                                  javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isReadable in interface javax.ws.rs.ext.MessageBodyReader<T>
        Returns:
        true if the class is a JAXB-marshallable class that has an XmlRootElement annotation.
      • readFrom

        public T readFrom​(Class<T> clazz,
                          Type type,
                          Annotation[] annotations,
                          javax.ws.rs.core.MediaType mediaType,
                          javax.ws.rs.core.MultivaluedMap<String,​String> parameters,
                          InputStream stream)
                   throws IOException,
                          javax.ws.rs.WebApplicationException
        Specified by:
        readFrom in interface javax.ws.rs.ext.MessageBodyReader<T>
        Throws:
        IOException
        javax.ws.rs.WebApplicationException