Class ExceptionMapperMXBeanImpl

java.lang.Object
org.glassfish.jersey.server.internal.monitoring.jmx.ExceptionMapperMXBeanImpl
All Implemented Interfaces:
ExceptionMapperMXBean

public class ExceptionMapperMXBeanImpl extends Object implements ExceptionMapperMXBean
MXBean implementing a ExceptionMapperMXBean mxbean interface.
Author:
Miroslav Fuksa
  • Constructor Details

    • ExceptionMapperMXBeanImpl

      public ExceptionMapperMXBeanImpl(ExceptionMapperStatistics mapperStatistics, MBeanExposer mBeanExposer, String parentName)
      Create a new MXBean and register it into mbean server using mBeanExposer.
      Parameters:
      mapperStatistics - Exception mapper statistics that should be exposed.
      mBeanExposer - Mbean exposer.
      parentName - Object name prefix of the parent mbeans.
  • Method Details

    • updateExceptionMapperStatistics

      public void updateExceptionMapperStatistics(ExceptionMapperStatistics mapperStatistics)
      Update the MXBean with new statistics.
      Parameters:
      mapperStatistics - New exception mapper statistics.
    • getExceptionMapperCount

      public Map<String,Long> getExceptionMapperCount()
      Description copied from interface: ExceptionMapperMXBean
      Get the statistics of execution of exception mappers.
      Specified by:
      getExceptionMapperCount in interface ExceptionMapperMXBean
      Returns:
      Map where keys are string class names of exception mappers and values are counts of execution of these mappers.
    • getSuccessfulMappings

      public long getSuccessfulMappings()
      Description copied from interface: ExceptionMapperMXBean
      Get count of all successful exception mappings. Successful exception mapping occurs when any exception mapper returns an valid response (even if response contains non-successful response status code).
      Specified by:
      getSuccessfulMappings in interface ExceptionMapperMXBean
      Returns:
      Count of successfully mapped exception.
    • getUnsuccessfulMappings

      public long getUnsuccessfulMappings()
      Description copied from interface: ExceptionMapperMXBean
      Get count of all unsuccessful exception mappings. Unsuccessful exception mapping occurs when any exception mapping process does not produce an valid response. The reason can be that the exception mapper is not found, or is found but throws exception.
      Specified by:
      getUnsuccessfulMappings in interface ExceptionMapperMXBean
      Returns:
      Count of unmapped exception.
    • getTotalMappings

      public long getTotalMappings()
      Description copied from interface: ExceptionMapperMXBean
      Get count of exception mappings that were performed on exceptions.
      Specified by:
      getTotalMappings in interface ExceptionMapperMXBean
      Returns:
      Count of all exception being mapped in the runtime.