Class MessageBodyReaders.CachingDelegatingMessageBodyReader

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<Object>
    Direct Known Subclasses:
    MessageBodyReaders.CachingJsonMessageBodyReader
    Enclosing class:
    MessageBodyReaders

    public abstract static class MessageBodyReaders.CachingDelegatingMessageBodyReader
    extends Object
    implements javax.ws.rs.ext.MessageBodyReader<Object>
    Caches the deserialized request body in the ContainerRequestContext for use later in the request lifecycle.

    This makes the request body accessible to any Jersey response filters or interceptors.

    See Also:
    PostRequestLoggingFilter
    • Constructor Detail

      • CachingDelegatingMessageBodyReader

        public CachingDelegatingMessageBodyReader()
    • Method Detail

      • getDelegate

        public abstract javax.ws.rs.ext.MessageBodyReader<Object> getDelegate()
      • isReadable

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

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