Class ExceptionMapperMXBeanImpl
java.lang.Object
org.glassfish.jersey.server.internal.monitoring.jmx.ExceptionMapperMXBeanImpl
- All Implemented Interfaces:
ExceptionMapperMXBean
MXBean implementing a
ExceptionMapperMXBean mxbean interface.- Author:
- Miroslav Fuksa
-
Constructor Summary
ConstructorsConstructorDescriptionExceptionMapperMXBeanImpl(ExceptionMapperStatistics mapperStatistics, MBeanExposer mBeanExposer, String parentName) Create a new MXBean and register it into mbean server usingmBeanExposer. -
Method Summary
Modifier and TypeMethodDescriptionGet the statistics of execution of exception mappers.longGet count of all successful exception mappings.longGet count of exception mappings that were performed on exceptions.longGet count of all unsuccessful exception mappings.voidupdateExceptionMapperStatistics(ExceptionMapperStatistics mapperStatistics) Update the MXBean with new statistics.
-
Constructor Details
-
ExceptionMapperMXBeanImpl
public ExceptionMapperMXBeanImpl(ExceptionMapperStatistics mapperStatistics, MBeanExposer mBeanExposer, String parentName) Create a new MXBean and register it into mbean server usingmBeanExposer.- Parameters:
mapperStatistics- Exception mapper statistics that should be exposed.mBeanExposer- Mbean exposer.parentName- Object name prefix of the parent mbeans.
-
-
Method Details
-
updateExceptionMapperStatistics
Update the MXBean with new statistics.- Parameters:
mapperStatistics- New exception mapper statistics.
-
getExceptionMapperCount
Description copied from interface:ExceptionMapperMXBeanGet the statistics of execution of exception mappers.- Specified by:
getExceptionMapperCountin interfaceExceptionMapperMXBean- Returns:
- Map where keys are string class names of
exception mappersand values are counts of execution of these mappers.
-
getSuccessfulMappings
public long getSuccessfulMappings()Description copied from interface:ExceptionMapperMXBeanGet count of all successful exception mappings. Successful exception mapping occurs when anyexception mapperreturns an valid response (even if response contains non-successful response status code).- Specified by:
getSuccessfulMappingsin interfaceExceptionMapperMXBean- Returns:
- Count of successfully mapped exception.
-
getUnsuccessfulMappings
public long getUnsuccessfulMappings()Description copied from interface:ExceptionMapperMXBeanGet 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 theexception mapperis not found, or is found but throws exception.- Specified by:
getUnsuccessfulMappingsin interfaceExceptionMapperMXBean- Returns:
- Count of unmapped exception.
-
getTotalMappings
public long getTotalMappings()Description copied from interface:ExceptionMapperMXBeanGet count of exception mappings that were performed on exceptions.- Specified by:
getTotalMappingsin interfaceExceptionMapperMXBean- Returns:
- Count of all exception being mapped in the runtime.
-