Package org.jboss.aop.advice

Examples of org.jboss.aop.advice.AspectDefinition


   }
  
   public void deployInterceptor(AspectAnnotationLoader loader, boolean isFactory, String name, Scope scope)
   {
      deployAspect(loader, isFactory, name, scope);
      AspectDefinition def = loader.getAspectManager().getAspectDefinition(name);
      ScopedInterceptorFactory factory = new ScopedInterceptorFactory(def);
      loader.getAspectManager().addInterceptorFactory(factory.getName(), factory);
   }
View Full Code Here


   }

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

   public Object getPerVMAspect(String def)
   {
      Object aspect = perVMAspects.get(def);
      if (aspect == null)
      {
         AspectDefinition adef = aspectDefinitions.get(def);
         if (adef != null && adef.getScope() == Scope.PER_VM)
         {
            synchronized (adef)
            {
               // double check but, now, in a sync block
               aspect = perVMAspects.get(def);
View Full Code Here

      internalRemoveAspectDefintion(name);
   }

   protected AspectDefinition internalRemoveAspectDefintion(String name)
   {
      AspectDefinition def = aspectDefinitions.remove(name);
      if (def != null)
      {
         def.undeploy();
         if (def.getScope() == Scope.PER_VM) perVMAspects.remove(def.getName());
      }
      return def;
   }
View Full Code Here

   public Object getPerVMAspect(String def)
   {
      Object aspect = perVMAspects.get(def);
      if (aspect == null)
      {
         AspectDefinition adef = aspectDefinitions.get(def);
         if (adef != null && adef.getScope() == Scope.PER_VM)
         {
            synchronized (adef)
            {
               // double check but, now, in a sync block
               aspect = perVMAspects.get(def);
View Full Code Here

      internalRemoveAspectDefintion(name);
   }

   protected AspectDefinition internalRemoveAspectDefintion(String name)
   {
      AspectDefinition def = aspectDefinitions.remove(name);
      if (def != null)
      {
         def.undeploy();
         if (def.getScope() == Scope.PER_VM) perVMAspects.remove(def.getName());
      }
      return def;
   }
View Full Code Here

                  notMyPerVMAspects.put(def, Boolean.TRUE);
               }
               else
               {
                  //We have a different version of the class deployed
                  AspectDefinition aspectDefinition = getAspectDefinition(def);
                  //Override the classloader to create the aspect instance
                  aspect = createPerVmAspect(def, aspectDefinition, getClassLoader());
                  myPerVMAspects.put(def, aspect);
               }
            }
View Full Code Here

/* 104 */         if ((aspects != null) && (aspects.size() > 0))
/*     */         {
/* 106 */           Iterator it = aspects.iterator();
/* 107 */           while (it.hasNext())
/*     */           {
/* 109 */             AspectDefinition def = (AspectDefinition)it.next();
/* 110 */             if ((def instanceof ManagedAspectDefinition))
/*     */             {
/* 112 */               depends.add(new AspectDependencyBuilderListItem(def.getName()));
/*     */             }
/*     */           }
/*     */         }
/*     */
/* 117 */         Map lifecycleCallbacks = binder.getLifecycleCallbacks();
View Full Code Here

/*  780 */     return this.parent.getPerVMAspect(def);
/*      */   }
/*      */
/*      */   public AspectDefinition getAspectDefinition(String name)
/*      */   {
/*  785 */     AspectDefinition factory = null;
/*  786 */     if (this.parentFirst)
/*      */     {
/*  788 */       factory = this.parent.getAspectDefinition(name);
/*  789 */       if (factory != null) return factory;
/*      */     }
View Full Code Here

/* 43 */     this.manager = manager;
/*    */   }
/*    */
/*    */   public void addLifecycleDefinition(AspectDefinition def)
/*    */   {
/* 48 */     AspectDefinition old = (AspectDefinition)this.lifecycles.put(def.getName(), def);
/* 49 */     if (old != null)
/*    */     {
/* 51 */       old.undeploy();
/*    */     }
/*    */   }
View Full Code Here

TOP

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

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.