Examples of addInterceptor()


Examples of org.hornetq.api.core.client.ClientSessionFactory.addInterceptor()

   {
      ClientSessionFactory sf = createInVMFactory();

      MyInterceptor3 interceptor = new MyInterceptor3();

      sf.addInterceptor(interceptor);

      ClientSession session = sf.createSession(false, true, true, true);

      session.createQueue(QUEUE, QUEUE, null, false);
View Full Code Here

Examples of org.hornetq.api.core.client.ServerLocator.addInterceptor()

            }
            return true;
         }
      };
     
      locator.addInterceptor(interceptorClient);

      ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator, 2);
      ClientSession session = sf.createSession(true, true);
      sessionList.add(session);
View Full Code Here

Examples of org.hornetq.core.client.impl.ClientSessionFactoryInternal.addInterceptor()

         @Override
         public void run()
         {
            try
            {
               sf.addInterceptor(interceptor);

               session.commit();
            }
            catch (HornetQException e)
            {
View Full Code Here

Examples of org.infinispan.AdvancedCache.addInterceptor()

    String newCacheName = "repl";
    cacheManager.defineConfiguration(newCacheName, configuration);
    Cache<String, String> cache = cacheManager.getCache(newCacheName);
    AdvancedCache advancedCache = cache.getAdvancedCache();
    advancedCache.withFlags(Flag.SKIP_REMOTE_LOOKUP, Flag.SKIP_CACHE_LOAD).put("local", "only");
    advancedCache.addInterceptor(new CustomCommandInterceptor(), 0);
    System.out.println(advancedCache.getName());
  }

}
View Full Code Here

Examples of org.infinispan.configuration.cache.CustomInterceptorsConfigurationBuilder.addInterceptor()

      ConfigurationBuilder builder = new ConfigurationBuilder();
      CustomInterceptorsConfigurationBuilder customInterceptorsBuilder = builder.customInterceptors();

      for (InterceptorConfiguration interceptorConfig : cfg.customInterceptors().interceptors()) {
         if (!(interceptorConfig.interceptor() instanceof RemoteValueWrapperInterceptor)) {
            customInterceptorsBuilder.addInterceptor().read(interceptorConfig);
         }
      }

      cfg.customInterceptors().interceptors(builder.build().customInterceptors().interceptors());
   }
View Full Code Here

Examples of org.infinispan.interceptors.InterceptorChain.addInterceptor()

      //cache.getAdvancedCache().getComponentRegistry().registerComponent(interceptor, TransactionTrackInterceptor.class);
      //TODO: begin of workaround because of ISPN-3066
      interceptor.cache = cache;
      interceptor.embeddedCacheManager = cache.getCacheManager();
      //TODO: end of workaround because of ISPN-3066
      chain.addInterceptor(interceptor, 0);
      return interceptor;
   }

   public synchronized final GlobalTransaction getLastExecutedTransaction() {
      int size = localTransactionsOperation.size();
View Full Code Here

Examples of org.jboss.aop.advice.AdviceBinding.addInterceptor()

      currentThread.setContextClassLoader(classLoader);
      Class<?> clazz = Class.forName(INTERCEPTOR_CLASS, false, classLoader);
     
      AdviceBinding binding = new AdviceBinding("userdefinedclbinding",
               "execution(* *->*(..))", null);
      binding.addInterceptor(clazz);
      AspectManager.instance().addBinding(binding);

      Method resetStatus = clazz.getDeclaredMethod("resetInvokeStatus");
      Method getStatus = clazz.getDeclaredMethod("getInvoked");
     
View Full Code Here

Examples of org.jboss.aop.microcontainer.beans.beanmetadatafactory.ArrayBindBeanMetaDataFactory.addInterceptor()

/*      */
/*      */     public void add(Object parent, Object child, QName name)
/*      */     {
/* 1258 */       ArrayBindBeanMetaDataFactory factory = (ArrayBindBeanMetaDataFactory)parent;
/* 1259 */       BaseInterceptorData interceptorData = (BaseInterceptorData)child;
/* 1260 */       factory.addInterceptor(interceptorData);
/*      */     }
/*      */   }
/*      */
/*      */   private static class BindContentInterceptor extends DefaultElementInterceptor
/*      */   {
View Full Code Here

Examples of org.jboss.aop.microcontainer.beans.beanmetadatafactory.BindBeanMetaDataFactory.addInterceptor()

/*      */
/*      */     public void add(Object parent, Object child, QName name)
/*      */     {
/* 1245 */       BindBeanMetaDataFactory factory = (BindBeanMetaDataFactory)parent;
/* 1246 */       BaseInterceptorData interceptorData = (BaseInterceptorData)child;
/* 1247 */       factory.addInterceptor(interceptorData);
/*      */     }
/*      */   }
/*      */
/*      */   private static class StringBufferHandler extends DefaultElementHandler
/*      */   {
View Full Code Here

Examples of org.jboss.aop.microcontainer.beans.beanmetadatafactory.StackBeanMetaDataFactory.addInterceptor()

/*      */
/*      */     public void add(Object parent, Object child, QName name)
/*      */     {
/* 1271 */       StackBeanMetaDataFactory factory = (StackBeanMetaDataFactory)parent;
/* 1272 */       BaseInterceptorData interceptorData = (BaseInterceptorData)child;
/* 1273 */       factory.addInterceptor(interceptorData);
/*      */     }
/*      */   }
/*      */
/*      */   private static class ArrayBindContentInterceptor extends DefaultElementInterceptor
/*      */   {
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.