Package net.bytebuddy.agent.builder
Class AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled
- java.lang.Object
-
- net.bytebuddy.agent.builder.AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled
-
- All Implemented Interfaces:
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy
- Enclosing interface:
- AgentBuilder.RedefinitionStrategy.ResubmissionStrategy
@Enhance public static class AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled extends java.lang.Object implements AgentBuilder.RedefinitionStrategy.ResubmissionStrategy
An enabled resubmission strategy.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.LookupKey
A key for a class loader that can only be used for looking up a preexisting value but avoids reference management.protected static class
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.ResubmissionInstallationListener
A job that resubmits any matched type that previously failed during transformation.protected static class
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.ResubmissionListener
A listener that registers types for resubmission that failed during transformations.protected static class
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.StorageKey
A key for a class loader that only weakly references the class loader.-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.RedefinitionStrategy.ResubmissionStrategy
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Disabled, AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled, AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Installation
-
-
Field Summary
Fields Modifier and Type Field Description private ElementMatcher<? super java.lang.ClassLoader>
classLoaderFilter
A filter to suppress class loaders, for example after they become inactive.private ElementMatcher<? super java.lang.Throwable>
matcher
The matcher for filtering error causes.private AgentBuilder.RedefinitionStrategy.ResubmissionScheduler
resubmissionScheduler
A scheduler that is responsible for resubmission of types.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Enabled(AgentBuilder.RedefinitionStrategy.ResubmissionScheduler resubmissionScheduler, ElementMatcher<? super java.lang.Throwable> matcher, ElementMatcher<? super java.lang.ClassLoader> classLoaderFilter)
Creates a new enabled resubmission strategy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Installation
apply(java.lang.instrument.Instrumentation instrumentation, AgentBuilder.LocationStrategy locationStrategy, AgentBuilder.Listener listener, AgentBuilder.InstallationListener installationListener, AgentBuilder.CircularityLock circularityLock, AgentBuilder.RawMatcher matcher, AgentBuilder.RedefinitionStrategy redefinitionStrategy, AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator, AgentBuilder.RedefinitionStrategy.Listener redefinitionBatchListener)
Invoked upon installation of an agent builder.
-
-
-
Field Detail
-
resubmissionScheduler
private final AgentBuilder.RedefinitionStrategy.ResubmissionScheduler resubmissionScheduler
A scheduler that is responsible for resubmission of types.
-
matcher
private final ElementMatcher<? super java.lang.Throwable> matcher
The matcher for filtering error causes.
-
classLoaderFilter
private final ElementMatcher<? super java.lang.ClassLoader> classLoaderFilter
A filter to suppress class loaders, for example after they become inactive.
-
-
Constructor Detail
-
Enabled
protected Enabled(AgentBuilder.RedefinitionStrategy.ResubmissionScheduler resubmissionScheduler, ElementMatcher<? super java.lang.Throwable> matcher, ElementMatcher<? super java.lang.ClassLoader> classLoaderFilter)
Creates a new enabled resubmission strategy.- Parameters:
resubmissionScheduler
- A scheduler that is responsible for resubmission of types.matcher
- The matcher for filtering error causes.classLoaderFilter
- A filter to suppress class loaders, for example after they become inactive.
-
-
Method Detail
-
apply
public AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Installation apply(java.lang.instrument.Instrumentation instrumentation, AgentBuilder.LocationStrategy locationStrategy, AgentBuilder.Listener listener, AgentBuilder.InstallationListener installationListener, AgentBuilder.CircularityLock circularityLock, AgentBuilder.RawMatcher matcher, AgentBuilder.RedefinitionStrategy redefinitionStrategy, AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator, AgentBuilder.RedefinitionStrategy.Listener redefinitionBatchListener)
Invoked upon installation of an agent builder.- Specified by:
apply
in interfaceAgentBuilder.RedefinitionStrategy.ResubmissionStrategy
- Parameters:
instrumentation
- The instrumentation instance to use.locationStrategy
- The location strategy to use.listener
- The listener to use.installationListener
- The installation listener to use.circularityLock
- The circularity lock to use.matcher
- The matcher to apply for analyzing if a type is to be resubmitted.redefinitionStrategy
- The redefinition strategy to use.redefinitionBatchAllocator
- The batch allocator to use.redefinitionBatchListener
- The batch listener to notify.- Returns:
- A potentially modified listener to apply.
-
-