Package org.jboss.aop.advice

Examples of org.jboss.aop.advice.AdviceBinding


         MethodByMethodInfo info = getCallerMethodInfo(callingHash, cname, calledHash);
         info.clear();
         Iterator it = bindings.iterator();
         while (it.hasNext())
         {
            AdviceBinding binding = (AdviceBinding) it.next();
            pointcutResolved(info, binding, new MethodCalledByMethodJoinpoint(info.getCallingMethod(), info.getMethod()));
         }
         finalizeMethodCalledByMethodInterceptorChain(info);
      }
View Full Code Here


            synchronized (manager.getBindings())
            {
               Iterator it = manager.getBindings().values().iterator();
               while (it.hasNext())
               {
                  AdviceBinding binding = (AdviceBinding) it.next();
                  if (binding.getPointcut().matchesCall(ClassAdvisor.this, callingMethod, called, calledCon))
                  {
                     addConstructorCalledByMethodPointcut(callingMethodHash, calledClass, calledConHash, binding);
                     matched = true;
                  }
               }
View Full Code Here

         ConByMethodInfo info = getConCalledByMethod(callingHash, cname, calledHash);
         info.clear();
         Iterator it = bindings.iterator();
         while (it.hasNext())
         {
            AdviceBinding binding = (AdviceBinding) it.next();
            pointcutResolved(info, binding, new ConstructorCalledByMethodJoinpoint(info.getCallingMethod(), info.getConstructor()));
         }
         finalizeConCalledByMethodInterceptorChain(info);
      }
View Full Code Here

   {
      Map<String, AdviceBinding> factories = manager.getBindings();
      StringBuffer buffer = new StringBuffer("");
      for (String name : factories.keySet())
      {
         AdviceBinding binding = factories.get(name);
         StringBuilder detail = new StringBuilder();
         if (binding != null)
         {
            detail.append(binding.getPointcut());
            detail.append("{");
            InterceptorFactory[] ifactories = binding.getInterceptorFactories();
            for (InterceptorFactory ifactory : ifactories)
            {
               detail.append(ifactory.getName());
            }
            detail.append("}");
View Full Code Here

            {
               throw new IllegalStateException("CollectionInterceptorUtil.createProxy(). Non Collection interceptor"
                       + interceptor);
            }

            AdviceBinding bindingm = new AdviceBinding(bindName, bind, null);
            AspectManager.instance().addBinding(bindingm);
         }
      }
      catch (ParseException e)
      {
View Full Code Here

      }
      catch (ParseException ex)
      {
         throw new RuntimeException("<bind> pointcut expression failed: " + pointcut, ex);
      }
      AdviceBinding binding = new AdviceBinding(name, p, cflowExpression, cflow, inters);
      manager.addBinding(binding);
   }
View Full Code Here

   @Override
   public synchronized void removeAdviceBindings(ArrayList<AdviceBinding> bindings)
   {
      for (int i = 0; i < bindings.size(); i++)
      {
         AdviceBinding binding = bindings.get(i);
         removeCallerPointcut(binding);
      }
      adviceBindings.removeAll(bindings);
      rebuildInterceptors();
      doesHaveAspects = adviceBindings.size() > 0;
View Full Code Here

   /**
    * Remove an interceptor pointcut with a given name
    */
   public void removeBinding(String name)
   {
      AdviceBinding binding = internalRemoveBinding(name);
      if (binding != null)
      {
         binding.clearAdvisors();
         dynamicStrategy.interceptorChainsUpdated();
      }
   }
View Full Code Here

         int bindSize = binds.size();

         for (int i = 0; i < bindSize; i++)
         {

            AdviceBinding binding = bindings.get(binds.get(i));
            if (binding == null)
            {
               logger.debug("AspectManager.removeBindings() no binding found with name " + binds.get(i));
               continue;
            }
            ArrayList<Advisor> ads = binding.getAdvisors();
            bindingAdvisors.addAll(ads);
            bindings.remove(binding.getName());
            Pointcut pointcut = binding.getPointcut();
            this.removePointcut(pointcut.getName());
            removedBindings.add(binding);
         }
      }
      Iterator<Advisor> it = bindingAdvisors.iterator();
View Full Code Here

    * Add an interceptor pointcut with a given name
    */
   public void addBinding(AdviceBinding binding)
   {
      Set<Advisor> affectedAdvisors = null;
      AdviceBinding removedBinding = null;
      synchronized(this)
      {
         removedBinding = internalRemoveBinding(binding.getName());
         affectedAdvisors = removedBinding == null ? null : new HashSet<Advisor>(removedBinding.getAdvisors());
         initBindingsMap();
         synchronized (bindings)
         {
            bindings.put(binding.getName(), binding);
         }
View Full Code Here

TOP

Related Classes of org.jboss.aop.advice.AdviceBinding

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.