Class DevConsoleManager


  • public class DevConsoleManager
    extends Object
    • Constructor Detail

      • DevConsoleManager

        public DevConsoleManager()
    • Method Detail

      • setHotReplacementContext

        public static void setHotReplacementContext​(HotReplacementContext hotReplacementContext)
      • setQuarkusBootstrap

        public static void setQuarkusBootstrap​(Object qb)
      • getQuarkusBootstrap

        public static Object getQuarkusBootstrap()
      • setGlobal

        public static void setGlobal​(String name,
                                     Object value)
        Sets a global that is shared between both the runtime and deployment parts
        Parameters:
        name - A namespaced key
        value - A value
      • getGlobal

        public static <T> T getGlobal​(String name)
        Gets a shared global
        Parameters:
        name - The key
        Returns:
        The value
      • isDoingHttpInitiatedReload

        public static boolean isDoingHttpInitiatedReload()
      • setDoingHttpInitiatedReload

        public static void setDoingHttpInitiatedReload​(boolean doingHttpInitiatedReload)
      • close

        public static void close()
      • register

        public static <T> void register​(String name,
                                        Function<Map<String,​String>,​T> action)
        Registers an action that will be called by a JSON RPC service at runtime
        Parameters:
        name - the name of the action, should be namespaced to avoid conflicts
        action - the action. The function receives a Map as parameters (named parameters) and returns an object of type T. Note that the type T must be a class shared by both the deployment and the runtime.
      • invoke

        public static <T> T invoke​(String name,
                                   Map<String,​String> params)
        Invokes a registered action
        Parameters:
        name - the name of the action
        params - the named parameters
        Returns:
        the result of the invocation. An empty map is returned for action not returning any result.