Package org.jboss.dependency.spi.tracker

Examples of org.jboss.dependency.spi.tracker.ContextTracker


            if (tracker != null && tracker != NOOP)
               return tracker;

            tracker = NOOP; // mark that we're initializing

            ContextTracker ct = null;
            MetaData metaData = scopeInfo.getMetaData();
            if (metaData != null)
            {
               ct = metaData.getMetaData(ContextTracker.class);
               if (ct == null)
View Full Code Here


   public Object getTarget(ControllerContext context)
   {
      Object user = getActualUser(context);
      Object result = getTargetForActualUser(user);

      ContextTracker myTracker = getContextTracker();
      if (myTracker != null)
         myTracker.incrementUsedBy(this, user);

      if (context instanceof ContextTracking)
      {
         ContextTracking ct = ContextTracking.class.cast(context);
         ContextTracker otherTracker = ct.getContextTracker();
         if (otherTracker != null && otherTracker != myTracker)
            otherTracker.incrementUsedBy(this, user);
      }

      return result;
   }
View Full Code Here

   public Object ungetTarget(ControllerContext context)
   {
      Object user = getActualUser(context);

      ContextTracker myTracker = getContextTracker();
      if (myTracker != null)
         myTracker.decrementUsedBy(this, user);

      if (context instanceof ContextTracking)
      {
         ContextTracking ct = ContextTracking.class.cast(context);
         ContextTracker otherTracker = ct.getContextTracker();
         if (otherTracker != null && otherTracker != myTracker)
            otherTracker.decrementUsedBy(this, user);
      }

      return ungetTargetForActualUser(user);
   }
View Full Code Here

   public Object getTarget(ContextTracker tracker)
   {
      Object result = getTargetForActualUser(tracker);
      if (tracker != null)
      {
         ContextTracker myTracker = getContextTracker();
         if (myTracker != null && myTracker != tracker)
            myTracker.incrementUsedBy(this, tracker);

         tracker.incrementUsedBy(this, tracker);
      }
      return result;
   }
View Full Code Here

   public Object ungetTarget(ContextTracker tracker)
   {
      if (tracker != null)
      {
         ContextTracker myTracker = getContextTracker();
         if (myTracker != null && myTracker != tracker)
            myTracker.decrementUsedBy(this, tracker);

         tracker.decrementUsedBy(this, tracker);
      }
      return ungetTargetForActualUser(tracker);
   }
View Full Code Here

TOP

Related Classes of org.jboss.dependency.spi.tracker.ContextTracker

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.