Class BeanClassRefreshCommand

  • All Implemented Interfaces:
    org.hotswap.agent.command.Command

    public class BeanClassRefreshCommand
    extends org.hotswap.agent.command.MergeableCommand
    BeanClassRefreshCommand. Collect all classes definitions/redefinitions for application 1. Merge all commands (definition, redefinition) for appClassLoader to single command. 2. Call proxy redefinitions in BeanArchiveAgent for all merged commands 3. Call bean class reload in BeanArchiveAgent for all merged commands
    Author:
    Vladimir Dvorak
    • Field Detail

      • reloadFlag

        public static boolean reloadFlag
        Flag for checking reload status. It is used in unit tests for waiting for reload finish. Set flag to true in the unit test class and wait until the flag is false again.
    • Constructor Detail

      • BeanClassRefreshCommand

        public BeanClassRefreshCommand​(ClassLoader appClassLoader,
                                       String className,
                                       String oldFullSignature,
                                       String oldSignatureForProxyCheck,
                                       String oldSignatureByStrategy,
                                       URL beanArchiveUrl,
                                       BeanReloadStrategy beanReloadStrategy)
        Instantiates a new bean class refresh command.
        Parameters:
        appClassLoader - the application class loader
        className - the class name
        oldFullSignature - the old full signature
        oldSignatureForProxyCheck - the old signature for proxy check
        oldSignatureByStrategy - the old signature by strategy
        beanArchiveUrl - the bean archive url
        beanReloadStrategy - the bean reload strategy
      • BeanClassRefreshCommand

        public BeanClassRefreshCommand​(ClassLoader appClassLoader,
                                       String archivePath,
                                       URL beanArchiveUrl,
                                       org.hotswap.agent.watch.WatchFileEvent event)
        Instantiates a new bean class refresh command.
        Parameters:
        appClassLoader - the application class loader
        archivePath - the archive path
        beanArchiveUrl - the bean archive url
        event - the class event
    • Method Detail

      • executeCommand

        public void executeCommand()
      • reloadBean

        public void reloadBean​(List<org.hotswap.agent.command.Command> mergedCommands,
                               Map<String,​String> oldFullSignatures,
                               Map<String,​String> oldSignatures)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object