JMX is an interface which can provide wide range of actions where one of them is gathering PMI metrics from PerfMBean
Oracle defines JMX as follows:
To make it short, JMX is a technology that lets you implement
management interfaces for Java applications.
A management interface, as defined by JMX, is composed of named
objects - called MBeans (Management Beans). MBeans are registered with
a name (an ObjectName) in an MBeanServer. To manage (a) resource(s) in
your application, you will write an MBean that defines its management
interface, and then register that MBean in your MBeanServer.