Package org.jboss.aop.advice

Examples of org.jboss.aop.advice.AdviceStack


      }
   }

   public void removeInterceptorStack(String stackName)
   {
      AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);
      if (stack == null) throw new RuntimeException("Stack " + stackName + " not found.");

      ClassAdvisor classAdvisor = null;
      if (getInstance() instanceof Advised)
      {
         Advised advised = (Advised) getInstance();
         classAdvisor = ((ClassAdvisor) advised._getAdvisor());
      }
      int interceptorsRemoved = 0;
      for (InterceptorFactory factory : stack.getInterceptorFactories())
      {
         if (!factory.isDeployed()) continue;
         Interceptor interceptor = factory.create(classAdvisor, null);
         if (interceptor != null)
         {
View Full Code Here


      return hasInstanceAspects;
   }

   public void insertInterceptorStack(String stackName)
   {
      AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);
      if (stack == null) throw new RuntimeException("Stack " + stackName + " not found.");

      ClassAdvisor classAdvisor = null;
      Object inst = getInstance();
      if (inst instanceof Advised)
      {
         Advised advised = (Advised) inst;
         classAdvisor = ((ClassAdvisor) advised._getAdvisor());
      }
      int interceptorsAdded = 0;
      for (InterceptorFactory factory : stack.getInterceptorFactories())
      {
         if (!factory.isDeployed()) continue;
         Interceptor interceptor = factory.create(classAdvisor, null);
         if (interceptor == null)
         {
View Full Code Here

      }
   }

   public void appendInterceptorStack(String stackName)
   {
      AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);
      if (stack == null) throw new RuntimeException("Stack " + stackName + " not found.");

      ClassAdvisor classAdvisor = null;
      Object inst = getInstance();
      if (inst instanceof Advised)
      {
         Advised advised = (Advised) inst;
         classAdvisor = ((ClassAdvisor) advised._getAdvisor());
      }
      int interceptorsAdded = 0;
      for (InterceptorFactory factory : stack.getInterceptorFactories())
      {
         if (!factory.isDeployed()) continue;
         Interceptor interceptor = factory.create(classAdvisor, null);
         if (interceptor == null)
         {
View Full Code Here

      }
   }

   public void removeInterceptorStack(String stackName)
   {
      AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);
      if (stack == null) throw new RuntimeException("Stack " + stackName + " not found.");

      ClassAdvisor classAdvisor = null;
      Object inst = getInstance();
      if (inst instanceof Advised)
      {
         Advised advised = (Advised) inst;
         classAdvisor = ((ClassAdvisor) advised._getAdvisor());
      }
      int interceptorsRemoved = 0;
      for (InterceptorFactory factory : stack.getInterceptorFactories())
      {
         if (!factory.isDeployed()) continue;
         Interceptor interceptor = factory.create(classAdvisor, null);
         if (interceptor != null)
         {
View Full Code Here

      return hasInstanceAspects;
   }

   public void insertInterceptorStack(String stackName)
   {
      AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);
      if (stack == null) throw new RuntimeException("Stack " + stackName + " not found.");

      ClassAdvisor classAdvisor = null;
      if (getInstance() instanceof Advised)
      {
         Advised advised = (Advised) getInstance();
         classAdvisor = ((ClassAdvisor) advised._getAdvisor());
      }
      int interceptorsAdded = 0;
      for (InterceptorFactory factory : stack.getInterceptorFactories())
      {
         if (!factory.isDeployed()) continue;
         Interceptor interceptor = factory.create(classAdvisor, null);
         if (interceptor == null)
         {
View Full Code Here

      }
   }

   public void appendInterceptorStack(String stackName)
   {
      AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);
      if (stack == null) throw new RuntimeException("Stack " + stackName + " not found.");

      ClassAdvisor classAdvisor = null;
      if (getInstance() instanceof Advised)
      {
         Advised advised = (Advised) getInstance();
         classAdvisor = ((ClassAdvisor) advised._getAdvisor());
      }
      int interceptorsAdded = 0;
      for (InterceptorFactory factory : stack.getInterceptorFactories())
      {
         if (!factory.isDeployed()) continue;
         Interceptor interceptor = factory.create(classAdvisor, null);
         if (interceptor == null)
         {
View Full Code Here

      }
   }

   public void removeInterceptorStack(String stackName)
   {
      AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);
      if (stack == null) throw new RuntimeException("Stack " + stackName + " not found.");

      ClassAdvisor classAdvisor = null;
      if (getInstance() instanceof Advised)
      {
         Advised advised = (Advised) getInstance();
         classAdvisor = ((ClassAdvisor) advised._getAdvisor());
      }
      int interceptorsRemoved = 0;
      for (InterceptorFactory factory : stack.getInterceptorFactories())
      {
         if (!factory.isDeployed()) continue;
         Interceptor interceptor = factory.create(classAdvisor, null);
         if (interceptor != null)
         {
View Full Code Here

               interceptors.add(factory);
            }
            else if (tag2.equals("stack-ref"))
            {
               String name = interceptorElement.getAttribute("name");
               AdviceStack stack = manager.getAdviceStack(name);
               if (stack == null) throw new Exception("there is no <stack> defined for name: " + name);
               interceptors.addAll(stack.getInterceptorFactories());
            }
            else
            {
               AdviceType type = null;
               if (!tag2.equals("advice"))
View Full Code Here

   public void deployInterceptorStack(Element element) throws Exception
   {
      ArrayList<InterceptorFactory> interceptors = loadInterceptors(element);
      String name = element.getAttribute("name");
      AdviceStack stack = new AdviceStack(name, interceptors);
      manager.addAdviceStack(stack);
   }
View Full Code Here

   }

   @Override
   public AdviceStack getAdviceStack(String name)
   {
      AdviceStack factory = null;
      if (parentFirst)
      {
         factory = parent.getAdviceStack(name);
         if (factory != null) return factory;
      }
View Full Code Here

TOP

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

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.