org.jboss.resteasy.client.jaxrs.cache

## Class CacheInterceptor

- java.lang.Object
- - org.jboss.resteasy.client.jaxrs.cache.CacheInterceptor

- All Implemented Interfaces:
    ClientRequestFilter, ClientResponseFilter

      public class CacheInterceptor
      extends Object
      implements ClientRequestFilter, ClientResponseFilter

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected BrowserCache` | `cache`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CacheInterceptor(BrowserCache cache)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cacheIfPossible(ClientRequestContext request, ClientResponseContext response)`
    `void` | `filter(ClientRequestContext request)` Filter method called before a request has been dispatched to a client transport layer.
    `void` | `filter(ClientRequestContext request, ClientResponseContext response)` Filter method called after a response has been provided for a request (either by a `request filter` or when the HTTP invocation returns.
    `protected BrowserCache.Entry` | `getEntry(ClientRequestContext request)`
    `void` | `updateOnNotModified(ClientRequestContext request, BrowserCache.Entry old, ClientResponseContext response)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### cache

          protected BrowserCache cache

  - ### Constructor Detail

    - #### CacheInterceptor

          public CacheInterceptor(BrowserCache cache)

  - ### Method Detail

    - #### filter

          public void filter(ClientRequestContext request)
                      throws IOException

      Description copied from interface: `ClientRequestFilter`
      Filter method called before a request has been dispatched to a client transport layer. Filters in the filter chain are ordered according to their `javax.annotation.Priority` class-level annotation value.
      Specified by:
        `filter` in interface `ClientRequestFilter`
      Parameters:
        `request` - request context.
      Throws:
        `IOException` - if an I/O exception occurs.

    - #### filter

          public void filter(ClientRequestContext request,
                    ClientResponseContext response)
                      throws IOException

      Description copied from interface: `ClientResponseFilter`
      Filter method called after a response has been provided for a request (either by a `request filter` or when the HTTP invocation returns. Filters in the filter chain are ordered according to their `javax.annotation.Priority` class-level annotation value.
      Specified by:
        `filter` in interface `ClientResponseFilter`
      Parameters:
        `request` - request context.
        `response` - response context.
      Throws:
        `IOException` - if an I/O exception occurs.

    - #### updateOnNotModified

          public void updateOnNotModified(ClientRequestContext request,
                                 BrowserCache.Entry old,
                                 ClientResponseContext response)

    - #### cacheIfPossible

          public void cacheIfPossible(ClientRequestContext request,
                             ClientResponseContext response)
                               throws IOException

      Throws:
        `IOException`

    - #### getEntry

          protected BrowserCache.Entry getEntry(ClientRequestContext request)
                                         throws Exception

      Throws:
        `Exception`

Copyright © 2014. All Rights Reserved.