Class SecureScriptThreadMxBeanWrapper


  • public class SecureScriptThreadMxBeanWrapper
    extends Object
    This class wraps access to the com.sun.management.ThreadMXBean and makes sure that on JDK's without the class no ClassNotFoundException (or others) are thrown. This class should only be used if it is verified this class is on the classpath, for example by checking the class through reflection.
    Author:
    Joram Barrez
    • Field Detail

      • threadMXBean

        protected com.sun.management.ThreadMXBean threadMXBean
    • Constructor Detail

      • SecureScriptThreadMxBeanWrapper

        public SecureScriptThreadMxBeanWrapper()
    • Method Detail

      • getThreadAllocatedBytes

        public long getThreadAllocatedBytes​(long threadId)