Package net.bytebuddy.agent.builder
Class AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.ResubmissionListener
- java.lang.Object
-
- net.bytebuddy.agent.builder.AgentBuilder.Listener.Adapter
-
- net.bytebuddy.agent.builder.AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.ResubmissionListener
-
- All Implemented Interfaces:
AgentBuilder.Listener
- Enclosing class:
- AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled
protected static class AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.ResubmissionListener extends AgentBuilder.Listener.Adapter
A listener that registers types for resubmission that failed during transformations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.ResubmissionListener.ConcurrentHashSet<T>
A set projection for aConcurrentHashMap
.-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.Listener
AgentBuilder.Listener.Adapter, AgentBuilder.Listener.Compound, AgentBuilder.Listener.Filtering, AgentBuilder.Listener.ModuleReadEdgeCompleting, AgentBuilder.Listener.NoOp, AgentBuilder.Listener.StreamWriting, AgentBuilder.Listener.WithErrorsOnly, AgentBuilder.Listener.WithTransformationsOnly
-
-
Field Summary
Fields Modifier and Type Field Description private ElementMatcher<? super java.lang.Throwable>
matcher
The matcher for filtering error causes.private java.util.concurrent.ConcurrentMap<AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.StorageKey,java.util.Set<java.lang.String>>
types
A map of class loaders to their types to resubmit.-
Fields inherited from interface net.bytebuddy.agent.builder.AgentBuilder.Listener
LOADED
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ResubmissionListener(ElementMatcher<? super java.lang.Throwable> matcher, java.util.concurrent.ConcurrentMap<AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.StorageKey,java.util.Set<java.lang.String>> types)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onError(java.lang.String typeName, java.lang.ClassLoader classLoader, JavaModule module, boolean loaded, java.lang.Throwable throwable)
Invoked when an error has occurred during transformation.-
Methods inherited from class net.bytebuddy.agent.builder.AgentBuilder.Listener.Adapter
onComplete, onDiscovery, onIgnored, onTransformation
-
-
-
-
Field Detail
-
matcher
private final ElementMatcher<? super java.lang.Throwable> matcher
The matcher for filtering error causes.
-
types
private final java.util.concurrent.ConcurrentMap<AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.StorageKey,java.util.Set<java.lang.String>> types
A map of class loaders to their types to resubmit.
-
-
Constructor Detail
-
ResubmissionListener
protected ResubmissionListener(ElementMatcher<? super java.lang.Throwable> matcher, java.util.concurrent.ConcurrentMap<AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.StorageKey,java.util.Set<java.lang.String>> types)
- Parameters:
matcher
- The matcher for filtering error causes.types
- A map of class loaders to their types to resubmit.
-
-
Method Detail
-
onError
public void onError(java.lang.String typeName, java.lang.ClassLoader classLoader, JavaModule module, boolean loaded, java.lang.Throwable throwable)
Invoked when an error has occurred during transformation.- Specified by:
onError
in interfaceAgentBuilder.Listener
- Overrides:
onError
in classAgentBuilder.Listener.Adapter
- Parameters:
typeName
- The binary name of the instrumented type.classLoader
- The class loader which is loading this type.module
- The instrumented type's module ornull
if the current VM does not support modules.loaded
-true
if the type is already loaded.throwable
- The occurred error.
-
-