Class CacheControlClientReaderInterceptor

java.lang.Object
org.apache.cxf.jaxrs.client.cache.CacheControlClientReaderInterceptor
All Implemented Interfaces:
jakarta.ws.rs.ext.ReaderInterceptor

@Priority(4999) public class CacheControlClientReaderInterceptor extends Object implements jakarta.ws.rs.ext.ReaderInterceptor
  • Constructor Details

    • CacheControlClientReaderInterceptor

      public CacheControlClientReaderInterceptor(javax.cache.Cache<Key,Entry> cache)
    • CacheControlClientReaderInterceptor

      public CacheControlClientReaderInterceptor()
  • Method Details

    • setCache

      public CacheControlClientReaderInterceptor setCache(javax.cache.Cache<Key,Entry> c)
    • aroundReadFrom

      public Object aroundReadFrom(jakarta.ws.rs.ext.ReaderInterceptorContext context) throws IOException, jakarta.ws.rs.WebApplicationException
      Specified by:
      aroundReadFrom in interface jakarta.ws.rs.ext.ReaderInterceptor
      Throws:
      IOException
      jakarta.ws.rs.WebApplicationException
    • isCacheInputStream

      public boolean isCacheInputStream()
    • setCacheResponseInputStream

      public void setCacheResponseInputStream(boolean cacheInputStream)
      Enforce the caching of the response stream. This is not recommended if the client code expects Serializable data, example, String or custom JAXB beans marked as Serializable, which can be stored in the cache directly. Use this property only if returning a cached entity does require a repeated stream parsing.
      Parameters:
      cacheInputStream -
    • isCacheControlValid

      protected boolean isCacheControlValid(jakarta.ws.rs.ext.ReaderInterceptorContext context, jakarta.ws.rs.core.CacheControl responseControl)