Class MBeanAwareTimeoutTransformer

  • All Implemented Interfaces:
    java.lang.instrument.ClassFileTransformer
    Direct Known Subclasses:
    HttpClient3TimeoutTransformer, UpdateFieldsInConstructorTimeoutTransformer

    public abstract class MBeanAwareTimeoutTransformer
    extends java.lang.Object
    implements java.lang.instrument.ClassFileTransformer
    Support class for transformers that expose runtime information through JMX

    All transformer implementations should extend from this base class.

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract byte[] doTransformClass​(javassist.CtClass cc)
      Transform a class that is guaranteed to exist and in scope of this agent instance
      byte[] transform​(java.lang.ClassLoader loader, java.lang.String className, java.lang.Class<?> classBeingRedefined, java.security.ProtectionDomain protectionDomain, byte[] classfileBuffer)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.instrument.ClassFileTransformer

        transform
    • Constructor Detail

      • MBeanAwareTimeoutTransformer

        public MBeanAwareTimeoutTransformer​(AgentInfo agent,
                                            java.util.Set<java.lang.String> classesToTransform)
    • Method Detail

      • transform

        public byte[] transform​(java.lang.ClassLoader loader,
                                java.lang.String className,
                                java.lang.Class<?> classBeingRedefined,
                                java.security.ProtectionDomain protectionDomain,
                                byte[] classfileBuffer)
        Specified by:
        transform in interface java.lang.instrument.ClassFileTransformer
      • doTransformClass

        protected abstract byte[] doTransformClass​(javassist.CtClass cc)
                                            throws java.lang.Exception
        Transform a class that is guaranteed to exist and in scope of this agent instance
        Parameters:
        cc - the class
        Returns:
        the new class definition
        Throws:
        java.lang.Exception - in case of any problems while transforming