Complex sentence: The library has access to the JVM state by calling JNI (Java Native Interface) functions and can register to receive events using event handler functions that are called by the JVM when such an event occurs.
Split into simpler sentences: The library has access to the JVM state by calling JNI (Java Native Interface) functions and can register for events. It has to provide event handler functions that are called by the JVM when such an event occurs.