Package net.bytebuddy.agent.builder
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
An agent builder configuration that allows the registration of listeners to the redefinition process.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
A matcher that determines if types should be resubmitted if it is not yet loaded.static interface
A matcher that determines if types should be resubmitted if it is not yet loaded and if an exception is raised.static interface
An agent builder configuration strategy that allows the definition of a discovery strategy.static interface
An agent builder configuration that allows the configuration of a batching strategy.static interface
AnAgentBuilder
specification that requires a resubmission specification.static interface
A complete but extendable resubmission specification.Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder
AgentBuilder.CircularityLock, AgentBuilder.ClassFileBufferStrategy, AgentBuilder.Default, AgentBuilder.DescriptionStrategy, AgentBuilder.FallbackStrategy, AgentBuilder.Identified, AgentBuilder.Ignored, AgentBuilder.InitializationStrategy, AgentBuilder.InjectionStrategy, AgentBuilder.InstallationListener, AgentBuilder.LambdaInstrumentationStrategy, AgentBuilder.Listener, AgentBuilder.LocationStrategy, AgentBuilder.Matchable<T extends AgentBuilder.Matchable<T>>, AgentBuilder.PoolStrategy, AgentBuilder.RawMatcher, AgentBuilder.RedefinitionListenable, AgentBuilder.RedefinitionStrategy, AgentBuilder.Transformer, AgentBuilder.TransformerDecorator, AgentBuilder.TypeStrategy
-
Method Summary
Modifier and TypeMethodDescriptionwith
(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.withResubmission
(AgentBuilder.RedefinitionStrategy.ResubmissionScheduler resubmissionScheduler) Specifies resubmission for given unloaded types or types that fail upon an exception during instrumentation.Methods inherited from interface net.bytebuddy.agent.builder.AgentBuilder
assureReadEdgeFromAndTo, assureReadEdgeFromAndTo, assureReadEdgeFromAndTo, assureReadEdgeTo, assureReadEdgeTo, assureReadEdgeTo, disableClassFormatChanges, disableNativeMethodPrefix, enableNativeMethodPrefix, ignore, ignore, ignore, ignore, installOn, installOnByteBuddyAgent, makeRaw, patchOn, patchOnByteBuddyAgent, type, type, type, type, warmUp, warmUp, with, with, with, with, with, with, with, with, with, with, with, with, with, with, with
-
Method Details
-
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.
-
withResubmission
AgentBuilder.RedefinitionListenable.WithoutResubmissionSpecification withResubmission(AgentBuilder.RedefinitionStrategy.ResubmissionScheduler resubmissionScheduler) 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.
-