public static interface AgentBuilder.InstallationListener
Modifier and Type | Interface and Description |
---|---|
static class |
AgentBuilder.InstallationListener.Adapter
An adapter implementation for an installation listener that serves as a convenience.
|
static class |
AgentBuilder.InstallationListener.Compound
A compound installation listener.
|
static class |
AgentBuilder.InstallationListener.ErrorSuppressing
A listener that suppresses any installation error.
|
static class |
AgentBuilder.InstallationListener.NoOp
A non-operational listener that does not do anything.
|
static class |
AgentBuilder.InstallationListener.StreamWriting
This installation listener prints the status of any installation to a
PrintStream . |
Modifier and Type | Field and Description |
---|---|
static Throwable |
SUPPRESS_ERROR
Indicates that an exception is handled.
|
Modifier and Type | Method and Description |
---|---|
void |
onAfterWarmUp(Map<Class<?>,byte[]> types,
ResettableClassFileTransformer classFileTransformer,
boolean transformed)
Invoked after a warump is executed.
|
void |
onBeforeInstall(Instrumentation instrumentation,
ResettableClassFileTransformer classFileTransformer)
Invoked prior to the installation of a class file transformer.
|
void |
onBeforeWarmUp(Set<Class<?>> types,
ResettableClassFileTransformer classFileTransformer)
Invoked before a warump is executed.
|
Throwable |
onError(Instrumentation instrumentation,
ResettableClassFileTransformer classFileTransformer,
Throwable throwable)
Invoked if an installation causes an error.
|
void |
onInstall(Instrumentation instrumentation,
ResettableClassFileTransformer classFileTransformer)
Invoked upon the successful installation of a class file transformer.
|
void |
onReset(Instrumentation instrumentation,
ResettableClassFileTransformer classFileTransformer)
Invoked if an installation is reset.
|
void |
onWarmUpError(Class<?> type,
ResettableClassFileTransformer classFileTransformer,
Throwable throwable)
Invoked when a class yields an unexpected error that is not catched by the listener.
|
@AlwaysNull static final Throwable SUPPRESS_ERROR
void onBeforeInstall(Instrumentation instrumentation, ResettableClassFileTransformer classFileTransformer)
instrumentation
- The instrumentation on which the class file transformer is installed.classFileTransformer
- The class file transformer that is being installed.void onInstall(Instrumentation instrumentation, ResettableClassFileTransformer classFileTransformer)
onError(Instrumentation, ResettableClassFileTransformer, Throwable)
.instrumentation
- The instrumentation on which the class file transformer is installed.classFileTransformer
- The class file transformer that is being installed.@MaybeNull Throwable onError(Instrumentation instrumentation, ResettableClassFileTransformer classFileTransformer, Throwable throwable)
onInstall(Instrumentation, ResettableClassFileTransformer)
.instrumentation
- The instrumentation on which the class file transformer is installed.classFileTransformer
- The class file transformer that is being installed.throwable
- The throwable that causes the error.null
if the error is handled. Any subsequent listeners are not called if the exception is handled.void onReset(Instrumentation instrumentation, ResettableClassFileTransformer classFileTransformer)
instrumentation
- The instrumentation on which the class file transformer is installed.classFileTransformer
- The class file transformer that is being installed.void onBeforeWarmUp(Set<Class<?>> types, ResettableClassFileTransformer classFileTransformer)
types
- The types that are used for the warmup.classFileTransformer
- The class file transformer that is warmed up.void onWarmUpError(Class<?> type, ResettableClassFileTransformer classFileTransformer, Throwable throwable)
type
- The type that caused the error.classFileTransformer
- The class file transformer that is warmed up.throwable
- The throwable that represents the error.void onAfterWarmUp(Map<Class<?>,byte[]> types, ResettableClassFileTransformer classFileTransformer, boolean transformed)
types
- The types that are used for the warmup mapped to their transformed byte code
or null
if the type was not transformed or failed to transform.classFileTransformer
- The class file transformer that is warmed up.transformed
- true
if at least one class caused an actual transformation.Copyright © 2014–2024. All rights reserved.