Interface AgentBuilder.RedefinitionListenable

    • Method Detail

      • with

        AgentBuilder.RedefinitionListenable with​(AgentBuilder.RedefinitionStrategy.Listener redefinitionListener)

        A redefinition listener is invoked before each batch of type redefinitions and on every error as well as after the redefinition was completed. A redefinition listener can be used for debugging or logging purposes and to apply actions between each batch, e.g. to pause or wait in order to avoid rendering the current VM non-responsive if a lot of classes are redefined.

        Adding several listeners does not replace previous listeners but applies them in the registration order.

        Parameters:
        redefinitionListener - The listener to register.
        Returns:
        A new instance of this agent builder which notifies the specified listener upon type redefinitions.