Jersey lets you register various event listeners to monitor the state of your JAX-RS application. Here are the two core listener interfaces that you may need to be aware of:
- org.glassfish.jersey.server.monitoring.ApplicationEventListener: This is a Jersey-specific provider component that listens to application events such as the initialization of the application, the start and stop of the application, and so on. The implementation class can be registered as any standard JAX-RS provider.
- org.glassfish.jersey.server.monitoring.RequestEventListener: The implementation of the interface will be called for request events when they occur. This is not a JAX-RS provider; an instance of RequestEventListener ...