Class JacksonJmxOperationResponseMapper

java.lang.Object
org.springframework.boot.actuate.endpoint.jmx.JacksonJmxOperationResponseMapper
All Implemented Interfaces:
JmxOperationResponseMapper

public class JacksonJmxOperationResponseMapper extends Object implements JmxOperationResponseMapper
JmxOperationResponseMapper that delegates to a Jackson JsonMapper to return a JSON response.
Since:
2.0.0
  • Constructor Details

    • JacksonJmxOperationResponseMapper

      public JacksonJmxOperationResponseMapper(@Nullable tools.jackson.databind.json.JsonMapper jsonMapper)
  • Method Details

    • mapResponseType

      public Class<?> mapResponseType(Class<?> responseType)
      Description copied from interface: JmxOperationResponseMapper
      Map the response type to its JMX compliant counterpart.
      Specified by:
      mapResponseType in interface JmxOperationResponseMapper
      Parameters:
      responseType - the operation's response type
      Returns:
      the JMX compliant type
    • mapResponse

      @Contract("!null -> !null") public @Nullable Object mapResponse(@Nullable Object response)
      Description copied from interface: JmxOperationResponseMapper
      Map the operation's response so that it can be consumed by a JMX compliant client.
      Specified by:
      mapResponse in interface JmxOperationResponseMapper
      Parameters:
      response - the operation's response
      Returns:
      the response, in a JMX compliant format