public class ExceptionMapperMXBeanImpl extends Object implements ExceptionMapperMXBean
ExceptionMapperMXBean
mxbean interface.Constructor and Description |
---|
ExceptionMapperMXBeanImpl(ExceptionMapperStatistics mapperStatistics,
MBeanExposer mBeanExposer,
String parentName)
Create a new MXBean and register it into mbean server using
mBeanExposer . |
Modifier and Type | Method and Description |
---|---|
Map<String,Long> |
getExceptionMapperCount()
Get the statistics of execution of exception mappers.
|
long |
getSuccessfulMappings()
Get count of all successful exception mappings.
|
long |
getTotalMappings()
Get count of exception mappings that were performed on exceptions.
|
long |
getUnsuccessfulMappings()
Get count of all unsuccessful exception mappings.
|
void |
updateExceptionMapperStatistics(ExceptionMapperStatistics mapperStatistics)
Update the MXBean with new statistics.
|
public ExceptionMapperMXBeanImpl(ExceptionMapperStatistics mapperStatistics, MBeanExposer mBeanExposer, String parentName)
mBeanExposer
.mapperStatistics
- Exception mapper statistics that should be exposed.mBeanExposer
- Mbean exposer.parentName
- Object name prefix of the parent mbeans.public void updateExceptionMapperStatistics(ExceptionMapperStatistics mapperStatistics)
mapperStatistics
- New exception mapper statistics.public Map<String,Long> getExceptionMapperCount()
ExceptionMapperMXBean
getExceptionMapperCount
in interface ExceptionMapperMXBean
exception mappers
and values are counts of execution of these mappers.public long getSuccessfulMappings()
ExceptionMapperMXBean
exception mapper
returns an valid response
(even if response contains non-successful response status code).getSuccessfulMappings
in interface ExceptionMapperMXBean
public long getUnsuccessfulMappings()
ExceptionMapperMXBean
exception mapper
is not found, or is found but throws
exception.getUnsuccessfulMappings
in interface ExceptionMapperMXBean
public long getTotalMappings()
ExceptionMapperMXBean
getTotalMappings
in interface ExceptionMapperMXBean
Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.