Package org.jboss.aop.advice

Examples of org.jboss.aop.advice.InterceptorFactory


   }

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


/*  726 */     return (this.hasOwnBindings) || (this.hasOwnPointcuts) || (this.hasOwnAnnotationIntroductions) || (this.hasOwnAnnotationOverrides) || (this.hasOwnInterfaceIntroductions) || (this.hasOwnTypedefs) || (this.hasOwnPrecedenceDefs) || (this.hasOwnClassMetaData);
/*      */   }
/*      */
/*      */   public InterceptorFactory getInterceptorFactory(String name)
/*      */   {
/*  738 */     InterceptorFactory factory = null;
/*  739 */     if (this.parentFirst)
/*      */     {
/*  741 */       factory = this.parent.getInterceptorFactory(name);
/*  742 */       if (factory != null) return factory;
/*      */     }
View Full Code Here

/*      */         continue;
/*  392 */       Element interceptorElement = (Element)children2.item(j);
/*  393 */       String tag2 = interceptorElement.getTagName();
/*  394 */       if (tag2.equals("interceptor"))
/*      */       {
/*  396 */         InterceptorFactory factory = deployInterceptor(interceptorElement);
/*  397 */         interceptors.add(factory);
/*      */       }
/*  399 */       else if (tag2.equals("interceptor-ref"))
/*      */       {
/*  401 */         String iname = interceptorElement.getAttribute("name");
/*  402 */         if (iname == null) throw new RuntimeException("interceptor-ref has null name attribute");
/*  403 */         InterceptorFactory factory = this.manager.getInterceptorFactory(iname);
/*  404 */         if (factory == null) throw new RuntimeException("unable to resolve interceptor-ref: " + iname);
/*  405 */         interceptors.add(factory);
/*      */       }
/*  407 */       else if (tag2.equals("stack-ref"))
/*      */       {
/*  409 */         String name = interceptorElement.getAttribute("name");
/*  410 */         AdviceStack stack = this.manager.getAdviceStack(name);
/*  411 */         if (stack == null) throw new Exception("there is no <stack> defined for name: " + name);
/*  412 */         interceptors.addAll(stack.getInterceptorFactories());
/*      */       }
/*      */       else
/*      */       {
/*  416 */         AdviceType type = null;
/*  417 */         if (!tag2.equals("advice"))
/*      */         {
/*      */           try
/*      */           {
/*  421 */             type = (AdviceType)Enum.valueOf(AdviceType.class, tag2.toUpperCase());
/*      */           }
/*      */           catch (IllegalArgumentException e)
/*      */           {
/*  425 */             StringBuffer message = new StringBuffer();
/*  426 */             message.append("unexpected tag inside binding: '");
/*  427 */             message.append(tag2);
/*  428 */             message.append("'\n\t\t\t\t\t   should be one of: \n\t\t\t\t\t\t'interceptor', \n\t\t\t\t\t\t'interceptor-ref', \n\t\t\t\t\t\t'advice', \n\t\t\t\t\t\t'");
/*  429 */             for (AdviceType adviceType : AdviceType.values())
/*      */             {
/*  431 */               message.append(adviceType.getName());
/*  432 */               message.append("', \n\t\t\t\t\t\t'");
/*      */             }
/*  434 */             message.append("stack-ref'.\n");
/*  435 */             throw new RuntimeException(message.toString());
/*      */           }
/*      */         }
/*  438 */         InterceptorFactory factory = deployAdvice(interceptorElement, type);
/*  439 */         interceptors.add(factory);
/*      */       }
/*      */     }
/*      */
/*  443 */     return interceptors;
View Full Code Here

/*     */     }
/* 302 */     int interceptorsAdded = 0;
/* 303 */     Iterator it = stack.getInterceptorFactories().iterator();
/* 304 */     while (it.hasNext())
/*     */     {
/* 306 */       InterceptorFactory factory = (InterceptorFactory)it.next();
/* 307 */       if (factory.isDeployed()) {
/* 308 */         Interceptor interceptor = factory.create(classAdvisor, null);
/* 309 */         insertInterceptor(interceptor);
/* 310 */         interceptorsAdded++;
/*     */       }
/*     */     }
/* 312 */     if (this.interceptorChainObserver != null)
View Full Code Here

/*     */     }
/* 330 */     int interceptorsAdded = 0;
/* 331 */     Iterator it = stack.getInterceptorFactories().iterator();
/* 332 */     while (it.hasNext())
/*     */     {
/* 334 */       InterceptorFactory factory = (InterceptorFactory)it.next();
/* 335 */       if (factory.isDeployed()) {
/* 336 */         Interceptor interceptor = factory.create(classAdvisor, null);
/* 337 */         appendInterceptor(interceptor);
/* 338 */         interceptorsAdded++;
/*     */       }
/*     */     }
/* 340 */     if (this.interceptorChainObserver != null)
View Full Code Here

/*     */     }
/* 358 */     int interceptorsRemoved = 0;
/* 359 */     Iterator it = stack.getInterceptorFactories().iterator();
/* 360 */     while (it.hasNext())
/*     */     {
/* 362 */       InterceptorFactory factory = (InterceptorFactory)it.next();
/* 363 */       if (factory.isDeployed()) {
/* 364 */         Interceptor interceptor = factory.create(classAdvisor, null);
/* 365 */         interceptorsRemoved += internalRemoveInterceptor(interceptor.getName());
/*     */       }
/*     */     }
/* 367 */     if (this.interceptorChainObserver != null)
/*     */     {
View Full Code Here

/*     */     }
/* 272 */     int interceptorsAdded = 0;
/* 273 */     Iterator it = stack.getInterceptorFactories().iterator();
/* 274 */     while (it.hasNext())
/*     */     {
/* 276 */       InterceptorFactory factory = (InterceptorFactory)it.next();
/* 277 */       if (factory.isDeployed()) {
/* 278 */         Interceptor interceptor = factory.create(classAdvisor, null);
/* 279 */         insertInterceptor(interceptor);
/* 280 */         interceptorsAdded++;
/*     */       }
/*     */     }
/* 282 */     if (this.interceptorChainObserver != null)
View Full Code Here

/*     */     }
/* 299 */     int interceptorsAdded = 0;
/* 300 */     Iterator it = stack.getInterceptorFactories().iterator();
/* 301 */     while (it.hasNext())
/*     */     {
/* 303 */       InterceptorFactory factory = (InterceptorFactory)it.next();
/* 304 */       if (factory.isDeployed()) {
/* 305 */         Interceptor interceptor = factory.create(classAdvisor, null);
/* 306 */         appendInterceptor(interceptor);
/* 307 */         interceptorsAdded++;
/*     */       }
/*     */     }
/* 309 */     if (this.interceptorChainObserver != null)
View Full Code Here

/*     */     }
/* 326 */     int interceptorsRemoved = 0;
/* 327 */     Iterator it = stack.getInterceptorFactories().iterator();
/* 328 */     while (it.hasNext())
/*     */     {
/* 330 */       InterceptorFactory factory = (InterceptorFactory)it.next();
/* 331 */       if (factory.isDeployed()) {
/* 332 */         Interceptor interceptor = factory.create(classAdvisor, null);
/* 333 */         interceptorsRemoved += internalRemoveInterceptor(interceptor.getName());
/*     */       }
/*     */     }
/* 335 */     if (this.interceptorChainObserver != null)
/*     */     {
View Full Code Here

      }
      int interceptorsAdded = 0;
      Iterator it = stack.getInterceptorFactories().iterator();
      while (it.hasNext())
      {
         InterceptorFactory factory = (InterceptorFactory) it.next();
         if (!factory.isDeployed()) continue;
         Interceptor interceptor = factory.create(classAdvisor, null);
         insertInterceptor(interceptor);
         interceptorsAdded ++;
      }
      if (interceptorChainObserver != null)
      {
View Full Code Here

TOP

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

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.