Package org.jboss.aop.advice

Examples of org.jboss.aop.advice.AdviceStack


      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());
      }
     
      Interceptor[] interceptors = stack.createInterceptors(classAdvisor, null);
      for (Interceptor interceptor: interceptors)
      {
         insertInterceptor(interceptor);
      }
      if (this.stacks == 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());
      }
     
      Interceptor[] interceptors = stack.createInterceptors(classAdvisor, null);
      for (Interceptor interceptor: interceptors)
      {
         appendInterceptor(interceptor);
      }
      if (this.stacks == null)
View Full Code Here

   {
      Interceptor[] interceptors = stacks.remove(stackName);
     
      if (interceptors == null)
      {
         AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);
         if (stack == null) throw new RuntimeException("Stack " + stackName + " not found.");
         return;
      }
     
      int interceptorsRemoved = 0;
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());
      }
     
      Interceptor[] interceptors = stack.createInterceptors(classAdvisor, null);
      for (Interceptor interceptor: interceptors)
      {
         insertInterceptor(interceptor);
      }
      if (this.stacks == 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());
      }
     
      Interceptor[] interceptors = stack.createInterceptors(classAdvisor, null);
      for (Interceptor interceptor: interceptors)
      {
         appendInterceptor(interceptor);
      }
      if (this.stacks == null)
View Full Code Here

   {
      Interceptor[] interceptors = stacks.remove(stackName);
     
      if (interceptors == null)
      {
         AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);
         if (stack == null) throw new RuntimeException("Stack " + stackName + " not found.");
         return;
      }
     
      int interceptorsRemoved = 0;
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

      else
      {
         initMethod.setAccessible(true);
      }

      AdviceStack stack = getAdvisor().getManager().getAdviceStack("HomeCallbackStack");
      Interceptor interceptors[];
      if(stack == null)
      {
         throw new IllegalStateException("EJBTHREE-1995: " + getAdvisor().getManager().getManagerFQN() + " does not define a HomeCallbackStack");
      }
      else
      {
         // we could do a joinpoint, but why bother
         interceptors = stack.createInterceptors(getAdvisor(), null);
      }

      StatefulContainerInvocation invocation = new StatefulContainerInvocation(interceptors, 0L, initMethod,
            initMethod, getAdvisor(), sessionId, null, this.getAsynchronousExecutor());
      invocation.setArguments(initParameterValues);
View Full Code Here

      else
      {
         initMethod.setAccessible(true);
      }

      AdviceStack stack = getAdvisor().getManager().getAdviceStack("HomeCallbackStack");
      Interceptor interceptors[];
      if(stack == null)
      {
         throw new IllegalStateException("EJBTHREE-1995: " + getAdvisor().getManager().getManagerFQN() + " does not define a HomeCallbackStack");
      }
      else
      {
         // we could do a joinpoint, but why bother
         interceptors = stack.createInterceptors(getAdvisor(), null);
      }

      StatefulContainerInvocation invocation = new StatefulContainerInvocation(interceptors, 0L, initMethod, initMethod, getAdvisor(), sessionId, null);
      invocation.setArguments(initParameterValues);
      if(metaData != null)
View Full Code Here

      if(deployment != null)
         this.dependencyPolicy = deployment.createDependencyPolicy(this);

      Advisor advisor = getAdvisor();
      AdviceStack stack = advisor.getManager().getAdviceStack("InjectionCallbackStack");
      if(stack == null)
         throw new IllegalStateException("EJBTHREE-2020: No InjectionCallbackStack defined for domain " + domain + " of " + this);
      injectionCallbackStack = stack.createInterceptors(advisor, null);
   }
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.