Class RestApiExceptionParserImpl

  • All Implemented Interfaces:
    org.bremersee.exception.ExceptionParser<org.bremersee.exception.model.RestApiException>, RestApiExceptionParser

    public class RestApiExceptionParserImpl
    extends Object
    implements RestApiExceptionParser
    The default implementation of a http response parser that creates a RestApiException.
    Author:
    Christian Bremer
    • Constructor Detail

      • RestApiExceptionParserImpl

        public RestApiExceptionParserImpl()
      • RestApiExceptionParserImpl

        public RestApiExceptionParserImpl​(org.springframework.http.converter.json.Jackson2ObjectMapperBuilder objectMapperBuilder)
        Instantiates a new rest api exception parser.
        Parameters:
        objectMapperBuilder - the object mapper builder
      • RestApiExceptionParserImpl

        public RestApiExceptionParserImpl​(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                          com.fasterxml.jackson.dataformat.xml.XmlMapper xmlMapper)
    • Method Detail

      • parseException

        public org.bremersee.exception.model.RestApiException parseException​(@Nullable
                                                                             String response,
                                                                             @Nullable
                                                                             Map<String,​? extends Collection<String>> headers)
        Specified by:
        parseException in interface org.bremersee.exception.ExceptionParser<org.bremersee.exception.model.RestApiException>