Class JohnzonMessageBodyReader<T>

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

    @Consumes({"application/json","*/json","*/*+json","*/x-json","*/javascript","*/x-javascript"})
    public class JohnzonMessageBodyReader<T>
    extends IgnorableTypes
    implements javax.ws.rs.ext.MessageBodyReader<T>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.apache.johnzon.mapper.Mapper mapper  
    • Method Summary

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

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

      • mapper

        private final org.apache.johnzon.mapper.Mapper mapper
    • Constructor Detail

      • JohnzonMessageBodyReader

        public JohnzonMessageBodyReader()
      • JohnzonMessageBodyReader

        public JohnzonMessageBodyReader​(org.apache.johnzon.mapper.Mapper mapper,
                                        java.util.Collection<java.lang.String> ignoredTypes)
    • Method Detail

      • isReadable

        public boolean isReadable​(java.lang.Class<?> rawType,
                                  java.lang.reflect.Type genericType,
                                  java.lang.annotation.Annotation[] annotations,
                                  javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isReadable in interface javax.ws.rs.ext.MessageBodyReader<T>
      • readFrom

        public T readFrom​(java.lang.Class<T> rawType,
                          java.lang.reflect.Type genericType,
                          java.lang.annotation.Annotation[] annotations,
                          javax.ws.rs.core.MediaType mediaType,
                          javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> httpHeaders,
                          java.io.InputStream entityStream)
                   throws java.io.IOException
        Specified by:
        readFrom in interface javax.ws.rs.ext.MessageBodyReader<T>
        Throws:
        java.io.IOException