Package org.bremersee.exception
Interface RestApiExceptionParser
- All Known Implementing Classes:
RestApiExceptionParserImpl
public interface RestApiExceptionParser
A http response parser that creates a
RestApiException
.- Author:
- Christian Bremer
-
Method Summary
Modifier and TypeMethodDescriptionparseException
(byte[] response, org.springframework.http.HttpStatusCode httpStatus, org.springframework.http.HttpHeaders headers) Parse exception.default RestApiException
parseException
(InputStream response, org.springframework.http.HttpStatusCode httpStatus, org.springframework.http.HttpHeaders headers) Parse exception.parseException
(String response, org.springframework.http.HttpStatusCode httpStatus, org.springframework.http.HttpHeaders headers) Parse exception.
-
Method Details
-
parseException
RestApiException parseException(String response, org.springframework.http.HttpStatusCode httpStatus, org.springframework.http.HttpHeaders headers) Parse exception.- Parameters:
response
- the responsehttpStatus
- the http statusheaders
- the headers- Returns:
- the parsed exception
-
parseException
RestApiException parseException(byte[] response, org.springframework.http.HttpStatusCode httpStatus, org.springframework.http.HttpHeaders headers) Parse exception.- Parameters:
response
- the responsehttpStatus
- the http statusheaders
- the headers- Returns:
- the parsed exception
-
parseException
default RestApiException parseException(InputStream response, org.springframework.http.HttpStatusCode httpStatus, org.springframework.http.HttpHeaders headers) throws IOException Parse exception.- Parameters:
response
- the responsehttpStatus
- the http statusheaders
- the headers- Returns:
- the rest api exception
- Throws:
IOException
- the io exception
-