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.long
Get count of all successful exception mappings.long
Get count of exception mappings that were performed on exceptions.long
Get count of all unsuccessful exception mappings.void
updateExceptionMapperStatistics
(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:ExceptionMapperMXBean
Get the statistics of execution of exception mappers.- Specified by:
getExceptionMapperCount
in interfaceExceptionMapperMXBean
- 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 anyexception mapper
returns an valid response (even if response contains non-successful response status code).- Specified by:
getSuccessfulMappings
in interfaceExceptionMapperMXBean
- 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 theexception mapper
is not found, or is found but throws exception.- Specified by:
getUnsuccessfulMappings
in interfaceExceptionMapperMXBean
- 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 interfaceExceptionMapperMXBean
- Returns:
- Count of all exception being mapped in the runtime.
-