Interface AgentBuilder.RedefinitionListenable

All Superinterfaces:
AgentBuilder
All Known Subinterfaces:
AgentBuilder.RedefinitionListenable.WithImplicitDiscoveryStrategy, AgentBuilder.RedefinitionListenable.WithoutBatchStrategy
All Known Implementing Classes:
AgentBuilder.Default.Redefining
Enclosing interface:
AgentBuilder

public static interface AgentBuilder.RedefinitionListenable extends AgentBuilder
An agent builder configuration that allows the registration of listeners to the redefinition process.
  • Method Details

    • with

      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.
    • withResubmission

      Specifies resubmission for given unloaded types or types that fail upon an exception during instrumentation.
      Parameters:
      resubmissionScheduler - The resubmission scheduler to use.
      Returns:
      A new builder to determine what types should be resubmitted given the supplied resubmission scheduler.