Monitoring RESTful web services using Jersey APIs

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 initialization of application, start and stop of 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 must be returned ...

Get RESTful Java Web Services - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.