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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaroundReadFrom(jakarta.ws.rs.ext.ReaderInterceptorContext context) protected booleanisCacheControlValid(jakarta.ws.rs.ext.ReaderInterceptorContext context, jakarta.ws.rs.core.CacheControl responseControl) booleanvoidsetCacheResponseInputStream(boolean cacheInputStream) Enforce the caching of the response stream.
-
Constructor Details
-
CacheControlClientReaderInterceptor
-
CacheControlClientReaderInterceptor
public CacheControlClientReaderInterceptor()
-
-
Method Details
-
setCache
-
aroundReadFrom
public Object aroundReadFrom(jakarta.ws.rs.ext.ReaderInterceptorContext context) throws IOException, jakarta.ws.rs.WebApplicationException - Specified by:
aroundReadFromin interfacejakarta.ws.rs.ext.ReaderInterceptor- Throws:
IOExceptionjakarta.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)
-