Class ValidatingMessageBodyReader<T>

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

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

      Fields 
      Modifier and Type Field Description
      protected javax.ws.rs.ext.Providers providers  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isReadable​(java.lang.Class<?> clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)  
      T readFrom​(java.lang.Class<T> clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> parameters, java.io.InputStream stream)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • providers

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

      • ValidatingMessageBodyReader

        public ValidatingMessageBodyReader()
    • Method Detail

      • isReadable

        public boolean isReadable​(java.lang.Class<?> clazz,
                                  java.lang.reflect.Type type,
                                  java.lang.annotation.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​(java.lang.Class<T> clazz,
                          java.lang.reflect.Type type,
                          java.lang.annotation.Annotation[] annotations,
                          javax.ws.rs.core.MediaType mediaType,
                          javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> parameters,
                          java.io.InputStream stream)
                   throws java.io.IOException,
                          javax.ws.rs.WebApplicationException
        Specified by:
        readFrom in interface javax.ws.rs.ext.MessageBodyReader<T>
        Throws:
        java.io.IOException
        javax.ws.rs.WebApplicationException