Package org.jboss.cache.config.parsing.custominterceptors

Examples of org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor


      cache = null;
   }

   public void testAddFirst()
   {
      AaaCustomInterceptor interceptor = new AaaCustomInterceptor();
      CustomInterceptorConfig config = new CustomInterceptorConfig(interceptor);
      config.setFirst(true);
      buildCache(config);
      assert cache.getInterceptorChain().get(0).equals(interceptor);
      assert cache.getInterceptorChain().size() == defaultInterceptroCount + 1;
View Full Code Here


      assert cache.getInterceptorChain().size() == defaultInterceptroCount + 1;
   }

   public void testAddLast()
   {
      AaaCustomInterceptor interceptor = new AaaCustomInterceptor();
      CustomInterceptorConfig config = new CustomInterceptorConfig(interceptor);
      config.setLast(true);
      buildCache(config);
      List chain = cache.getInterceptorChain();
      assert chain.get(chain.size() - 1).equals(interceptor);
View Full Code Here

      assert cache.getInterceptorChain().size() == defaultInterceptroCount + 1;
   }

   public void testAddAfter()
   {
      AaaCustomInterceptor interceptor = new AaaCustomInterceptor();
      CustomInterceptorConfig config = new CustomInterceptorConfig(interceptor);
      config.setAfterClass(MVCCLockingInterceptor.class.getName());
      buildCache(config);
      List<CommandInterceptor> chain = cache.getInterceptorChain();
      int occurenceCount = 0;
View Full Code Here

      assert cache.getInterceptorChain().size() == defaultInterceptroCount + 1;
   }

   public void testAddBefore()
   {
      AaaCustomInterceptor interceptor = new AaaCustomInterceptor();
      CustomInterceptorConfig config = new CustomInterceptorConfig(interceptor);
      config.setBeforeClass(MVCCLockingInterceptor.class.getName());
      buildCache(config);
      List<CommandInterceptor> chain = cache.getInterceptorChain();
      int occurenceCount = 0;
View Full Code Here

   }

   @Test(enabled = true)
   public void testAddAtIndex()
   {
      AaaCustomInterceptor interceptor = new AaaCustomInterceptor();
      CustomInterceptorConfig config = new CustomInterceptorConfig(interceptor);
      config.setIndex(1);
      buildCache(config);
      List<CommandInterceptor> chain = cache.getInterceptorChain();
      assert chain.get(1).equals(interceptor);
View Full Code Here

      assert cache.getInterceptorChain().size() == defaultInterceptroCount + 1;
   }

   public void testAddAtInvalidIndex()
   {
      AaaCustomInterceptor interceptor = new AaaCustomInterceptor();
      CustomInterceptorConfig config = new CustomInterceptorConfig(interceptor);
      config.setIndex(1000);
      try
      {
         buildCache(config);
View Full Code Here

   public void testCustomInterceptors()
   {
      List<CustomInterceptorConfig> interceptorConfigs = syncConfig.getCustomInterceptors();
      assert interceptorConfigs.size() == 5;
      assert interceptorConfigs.get(0).getInterceptor() instanceof AaaCustomInterceptor;
      AaaCustomInterceptor a = (AaaCustomInterceptor) interceptorConfigs.get(0).getInterceptor();
      assert a.getAttrOne().equals("value1");
      assert a.getAttrTwo().equals("value2");
      assert a.getAttrThree() == null;
      assert interceptorConfigs.get(1).getInterceptor() instanceof BbbCustomInterceptor;
      assert interceptorConfigs.get(2).getInterceptor() instanceof AaaCustomInterceptor;
      assert interceptorConfigs.get(3).getInterceptor() instanceof BbbCustomInterceptor;
      assert interceptorConfigs.get(4).getInterceptor() instanceof AaaCustomInterceptor;
      assert interceptorConfigs.get(0).isFirst();
View Full Code Here

      cache = null;
   }

   public void testAddFirst()
   {
      AaaCustomInterceptor interceptor = new AaaCustomInterceptor();
      CustomInterceptorConfig config = new CustomInterceptorConfig(interceptor);
      config.setFirst(true);
      buildCache(config);
      assert cache.getInterceptorChain().get(0).equals(interceptor);
      assert cache.getInterceptorChain().size() == defaultInterceptroCount + 1;
View Full Code Here

      assert cache.getInterceptorChain().size() == defaultInterceptroCount + 1;
   }

   public void testAddLast()
   {
      AaaCustomInterceptor interceptor = new AaaCustomInterceptor();
      CustomInterceptorConfig config = new CustomInterceptorConfig(interceptor);
      config.setLast(true);
      buildCache(config);
      List chain = cache.getInterceptorChain();
      assert chain.get(chain.size() - 1).equals(interceptor);
View Full Code Here

      assert cache.getInterceptorChain().size() == defaultInterceptroCount + 1;
   }

   public void testAddAfter()
   {
      AaaCustomInterceptor interceptor = new AaaCustomInterceptor();
      CustomInterceptorConfig config = new CustomInterceptorConfig(interceptor);
      config.setAfterClass(MVCCLockingInterceptor.class.getName());
      buildCache(config);
      List<CommandInterceptor> chain = cache.getInterceptorChain();
      int occurenceCount = 0;
View Full Code Here

TOP

Related Classes of org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor

Copyright © 2018 www.massapicom. 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.