Examples of CustomInterceptorConfig


Examples of org.jboss.cache.config.CustomInterceptorConfig

   }

   public void testAddAtInvalidIndex()
   {
      AaaCustomInterceptor interceptor = new AaaCustomInterceptor();
      CustomInterceptorConfig config = new CustomInterceptorConfig(interceptor);
      config.setIndex(1000);
      try
      {
         buildCache(config);
         assert false : "exception expected here";
      }
View Full Code Here

Examples of org.jboss.cache.config.CustomInterceptorConfig

               "                   class=\"org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor\"/>\n" +
               "   </customInterceptors>";
      Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
      List<CustomInterceptorConfig> configs = parser.parseCustomInterceptors(element);
      assert configs.size() == 5;
      CustomInterceptorConfig one = configs.get(0);
      assert one.isFirst();
      assert one.getInterceptor() instanceof AaaCustomInterceptor;
      assert ((AaaCustomInterceptor)one.getInterceptor()).getAttrOne().equals("value1");
      assert ((AaaCustomInterceptor)one.getInterceptor()).getAttrTwo().equals("value2");
      assert ((AaaCustomInterceptor)one.getInterceptor()).getAttrThree().equals("value3");

      CustomInterceptorConfig two = configs.get(1);
      assert !two.isFirst();
      assert two.isLast();
      assert two.getInterceptor() instanceof BbbCustomInterceptor;

      CustomInterceptorConfig three = configs.get(2);
      assert !three.isFirst();
      assert !three.isLast();
      assert three.getIndex() == 3;

      CustomInterceptorConfig four = configs.get(3);
      assert !four.isFirst();
      assert !four.isLast();
      assert four.getBeforeClass().equals("org.jboss.cache.interceptors.CallInterceptor");

      CustomInterceptorConfig five = configs.get(4);
      assert !five.isFirst();
      assert !five.isLast();
      assert five.getAfterClass().equals("org.jboss.cache.interceptors.CallInterceptor");
   }
View Full Code Here

Examples of org.jboss.cache.config.CustomInterceptorConfig

         after = getAttributeValue(interceptorElement, "after");
         if (!existsAttribute(after)) after = null;

         CommandInterceptor interceptor = buildCommandInterceptor(interceptorElement);

         CustomInterceptorConfig customInterceptorConfig = new CustomInterceptorConfig(interceptor, first, last, index, after, before);
         interceptorConfigs.add(customInterceptorConfig);
      }
      return interceptorConfigs;
   }
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.