Examples of LightweightBrowserCache


Examples of org.jboss.resteasy.client.cache.LightweightBrowserCache

        ClientInterceptorRepositoryImpl interceptors = clientRequestFactory
                .getPrefixInterceptors();
        interceptors.registerInterceptor(new LoggingExecutionInterceptor());
        interceptors.registerInterceptor(new CacheInterceptor(
                new LightweightBrowserCache()));
        interceptors.registerInterceptor(new ForceCachingExecutionInterceptor(
                10));

        // create a proxy using the JAX-RS annotation
        photoResource = clientRequestFactory.createProxy(PhotoResource.class);
View Full Code Here

Examples of org.jboss.resteasy.client.cache.LightweightBrowserCache

   @Test
   public void testMaxSize() throws Exception
   {
      MyProxy proxy = ProxyFactory.create(MyProxy.class, generateBaseUrl());
      LightweightBrowserCache cache = CacheFactory.makeCacheable(proxy);
      cache.setMaxBytes(20);

      count = 0;

      String rtn = proxy.getCacheit("1");
      Assert.assertEquals("cachecache" + 1, rtn);
View Full Code Here

Examples of org.jboss.resteasy.client.cache.LightweightBrowserCache

        ClientInterceptorRepositoryImpl interceptors = clientRequestFactory
                .getPrefixInterceptors();
        interceptors.registerInterceptor(new LoggingExecutionInterceptor());
        interceptors.registerInterceptor(new CacheInterceptor(
                new LightweightBrowserCache()));
        interceptors.registerInterceptor(new ForceCachingExecutionInterceptor(
                10));

        // create a proxy using the JAX-RS annotation
        photoResource = clientRequestFactory.createProxy(PhotoResource.class);
View Full Code Here

Examples of org.jboss.resteasy.client.cache.LightweightBrowserCache

   @Test
   public void testMaxSize() throws Exception
   {
      MyProxy proxy = ProxyFactory.create(MyProxy.class, generateBaseUrl());
      LightweightBrowserCache cache = CacheFactory.makeCacheable(proxy);
      cache.setMaxBytes(20);

      count = 0;

      String rtn = proxy.getCacheit("1");
      Assert.assertEquals("cachecache" + 1, rtn);
View Full Code Here

Examples of org.jboss.resteasy.client.jaxrs.cache.LightweightBrowserCache

   public void testMaxSize() throws Exception
   {
      ResteasyClient client = new ResteasyClientBuilder().build();
      ResteasyWebTarget target = client.target(generateBaseUrl());
      target.register(BrowserCacheFeature.class);
      LightweightBrowserCache cache = (LightweightBrowserCache)target.getConfiguration().getProperty(BrowserCache.class.getName());
      cache.setMaxBytes(20);
      MyProxy proxy = target.proxy(MyProxy.class);


      count = 0;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.