Class AgentBuilder.InstallationListener.Compound

    • Constructor Detail

      • Compound

        public Compound​(AgentBuilder.InstallationListener... installationListener)
        Creates a new compound listener.
        Parameters:
        installationListener - The installation listeners to notify.
      • Compound

        public Compound​(java.util.List<? extends AgentBuilder.InstallationListener> installationListeners)
        Creates a new compound listener.
        Parameters:
        installationListeners - The installation listeners to notify.
    • Method Detail

      • onBeforeInstall

        public void onBeforeInstall​(java.lang.instrument.Instrumentation instrumentation,
                                    ResettableClassFileTransformer classFileTransformer)
        Invoked prior to the installation of a class file transformer.
        Specified by:
        onBeforeInstall in interface AgentBuilder.InstallationListener
        Parameters:
        instrumentation - The instrumentation on which the class file transformer is installed.
        classFileTransformer - The class file transformer that is being installed.
      • onReset

        public void onReset​(java.lang.instrument.Instrumentation instrumentation,
                            ResettableClassFileTransformer classFileTransformer)
        Invoked if an installation is reset.
        Specified by:
        onReset in interface AgentBuilder.InstallationListener
        Parameters:
        instrumentation - The instrumentation on which the class file transformer is installed.
        classFileTransformer - The class file transformer that is being installed.
      • onBeforeWarmUp

        public void onBeforeWarmUp​(java.util.Set<java.lang.Class<?>> types,
                                   ResettableClassFileTransformer classFileTransformer)
        Invoked before a warump is executed.
        Specified by:
        onBeforeWarmUp in interface AgentBuilder.InstallationListener
        Parameters:
        types - The types that are used for the warmup.
        classFileTransformer - The class file transformer that is warmed up.
      • onWarmUpError

        public void onWarmUpError​(java.lang.Class<?> type,
                                  ResettableClassFileTransformer classFileTransformer,
                                  java.lang.Throwable throwable)
        Invoked when a class yields an unexpected error that is not catched by the listener.
        Specified by:
        onWarmUpError in interface AgentBuilder.InstallationListener
        Parameters:
        type - The type that caused the error.
        classFileTransformer - The class file transformer that is warmed up.
        throwable - The throwable that represents the error.
      • onAfterWarmUp

        public void onAfterWarmUp​(java.util.Map<java.lang.Class<?>,​byte[]> types,
                                  ResettableClassFileTransformer classFileTransformer,
                                  boolean transformed)
        Invoked after a warump is executed.
        Specified by:
        onAfterWarmUp in interface AgentBuilder.InstallationListener
        Parameters:
        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.