Examples of LifecyclePhase


Examples of org.gatein.pc.api.LifeCyclePhase

      this.log = Logger.getLogger(PortletFilterImpl.class);
   }

   public <T> T instance(Class<T> type)
   {
      LifeCyclePhase phase = typeToPhase.get(type);

      // It means we can cast unless the developers did not implement the correct interface
      if (info.getPhases().contains(phase))
      {
         if (type.isInstance(lifeCycle.getInstance()))
View Full Code Here

Examples of org.gatein.pc.api.LifeCyclePhase

      this.log = LoggerFactory.getLogger(PortletFilterImpl.class);
   }

   public <T> T instance(Class<T> type)
   {
      LifeCyclePhase phase = typeToPhase.get(type);

      // It means we can cast unless the developers did not implement the correct interface
      if (info.getPhases().contains(phase))
      {
         if (type.isInstance(lifeCycle.getInstance()))
View Full Code Here

Examples of org.gatein.pc.api.LifeCyclePhase

      this.log = LoggerFactory.getLogger(PortletFilterImpl.class);
   }

   public <T> T instance(Class<T> type)
   {
      LifeCyclePhase phase = typeToPhase.get(type);

      // It means we can cast unless the developers did not implement the correct interface
      if (info.getPhases().contains(phase))
      {
         if (type.isInstance(lifeCycle.getInstance()))
View Full Code Here

Examples of org.jboss.portal.portlet.LifeCyclePhase

      this.log = Logger.getLogger(PortletFilterImpl.class);
   }

   public <T> T instance(Class<T> type)
   {
      LifeCyclePhase phase = typeToPhase.get(type);

      // It means we can cast unless the developers did not implement the correct interface
      if (info.getPhases().contains(phase))
      {
         if (type.isInstance(lifeCycle.getInstance()))
View Full Code Here

Examples of org.mule.api.lifecycle.LifecyclePhase

        String lastPhase = NotInLifecyclePhase.PHASE_NAME;
        for (String phase : completedPhases)
        {
            if(isDirectTransition(lastPhase, phase))
            {
                LifecyclePhase lp = phases.get(phase);
                lp.applyLifecycle(object);
                lastPhase = phase;
            }
        }
    }
View Full Code Here

Examples of org.mule.api.lifecycle.LifecyclePhase

         */
        protected transient final Log logger = LogFactory.getLog(RegistryLifecycleCallback.class);

        public void onTransition(String phaseName, Object object) throws MuleException
        {
            LifecyclePhase phase = phases.get(phaseName);

            if (logger.isDebugEnabled())
            {
                logger.debug("Applying lifecycle phase: " + phase + " for registry: " + object.getClass().getSimpleName());
            }

            if (phase instanceof ContainerManagedLifecyclePhase)
            {
                phase.applyLifecycle(object);
                return;
            }

            // overlapping interfaces can cause duplicates
            Set<Object> duplicates = new HashSet<Object>();

            for (LifecycleObject lo : phase.getOrderedLifecycleObjects())
            {
                // TODO Collection -> List API refactoring
                Collection<?> targetsObj = getLifecycleObject().lookupObjectsForLifecycle(lo.getType());
                List<Object> targets = new LinkedList<Object>(targetsObj);
                if (targets.size() == 0)
                {
                    continue;
                }

                lo.firePreNotification(muleContext);

                for (Iterator<Object> target = targets.iterator(); target.hasNext();)
                {
                    Object o = target.next();
                    if (duplicates.contains(o))
                    {
                        target.remove();
                    }
                    else
                    {
                        if (logger.isDebugEnabled())
                        {
                            logger.debug("lifecycle phase: " + phase.getName() + " for object: " + o);
                        }
                        phase.applyLifecycle(o);
                        target.remove();
                        duplicates.add(o);
                    }
                }

View Full Code Here

Examples of org.mule.api.lifecycle.LifecyclePhase

        String lastPhase = NotInLifecyclePhase.PHASE_NAME;
        for (String phase : completedPhases)
        {
            if(isDirectTransition(lastPhase, phase))
            {
                LifecyclePhase lp = phases.get(phase);
                lp.applyLifecycle(object);
                lastPhase = phase;
            }
        }
    }
View Full Code Here

Examples of org.mule.api.lifecycle.LifecyclePhase

         */
        protected transient final Log logger = LogFactory.getLog(RegistryLifecycleCallback.class);

        public void onTransition(String phaseName, Object object) throws MuleException
        {
            LifecyclePhase phase = phases.get(phaseName);

            if (logger.isDebugEnabled())
            {
                logger.debug("Applying lifecycle phase: " + phase + " for registry: " + object.getClass().getSimpleName());
            }

            if (phase instanceof ContainerManagedLifecyclePhase)
            {
                phase.applyLifecycle(object);
                return;
            }

            // overlapping interfaces can cause duplicates
            Set<Object> duplicates = new HashSet<Object>();

            for (LifecycleObject lo : phase.getOrderedLifecycleObjects())
            {
                // TODO Collection -> List API refactoring
                Collection<?> targetsObj = getLifecycleObject().lookupObjectsForLifecycle(lo.getType());
                List<Object> targets = new LinkedList<Object>(targetsObj);
                if (targets.size() == 0)
                {
                    continue;
                }

                lo.firePreNotification(muleContext);

                for (Iterator<Object> target = targets.iterator(); target.hasNext();)
                {
                    Object o = target.next();
                    if (duplicates.contains(o))
                    {
                        target.remove();
                    }
                    else
                    {
                        if (logger.isDebugEnabled())
                        {
                            logger.debug("lifecycle phase: " + phase.getName() + " for object: " + o);
                        }
                        phase.applyLifecycle(o);
                        target.remove();
                        duplicates.add(o);
                    }
                }

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.