Class ContextualReloadHelper


  • public class ContextualReloadHelper
    extends java.lang.Object
    The Class ContextualReloadHelper.
    Author:
    alpapad@gmail.com
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean addToReloadSet​(javax.enterprise.context.spi.Context ctx, javax.enterprise.context.spi.Contextual<java.lang.Object> managedBean)
      Tries to add the bean in the context so it is reloaded in the next activation of the context.
      static void destroy​(WeldHotswapContext ctx, javax.enterprise.context.spi.Contextual<?> managedBean)
      Will remove bean from context forcing a clean new instance to be created (eg calling post-construct)
      static void reinitialize​(javax.enterprise.context.spi.Context ctx, javax.enterprise.context.spi.Contextual<java.lang.Object> contextual)
      Will re-inject any managed beans in the target.
      static void reload​(WeldHotswapContext ctx)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ContextualReloadHelper

        public ContextualReloadHelper()
    • Method Detail

      • addToReloadSet

        public static boolean addToReloadSet​(javax.enterprise.context.spi.Context ctx,
                                             javax.enterprise.context.spi.Contextual<java.lang.Object> managedBean)
        Tries to add the bean in the context so it is reloaded in the next activation of the context.
        Parameters:
        ctx -
        managedBean -
        Returns:
      • destroy

        public static void destroy​(WeldHotswapContext ctx,
                                   javax.enterprise.context.spi.Contextual<?> managedBean)
        Will remove bean from context forcing a clean new instance to be created (eg calling post-construct)
        Parameters:
        ctx -
        managedBean -
      • reinitialize

        public static void reinitialize​(javax.enterprise.context.spi.Context ctx,
                                        javax.enterprise.context.spi.Contextual<java.lang.Object> contextual)
        Will re-inject any managed beans in the target. Will not call any other life-cycle methods
        Parameters:
        ctx -
        managedBean -