public interface ResponseErrorHandler
RestTemplate
が使用する戦略インターフェース。修飾子と型 | メソッドと説明 |
---|---|
void | handleError(ClientHttpResponse response) 指定されたレスポンスのエラーを処理します。 |
default void | handleError(URISE url, HttpMethod method, ClientHttpResponse response) リクエスト URL および HTTP メソッドへのアクセスを提供する追加情報を持つ handleError(ClientHttpResponse) の代替。 |
boolean | hasError(ClientHttpResponse response) 指定されたレスポンスにエラーがあるかどうかを示します。 |
boolean hasError(ClientHttpResponse response) throws IOExceptionSE
実装は通常、レスポンスの HttpStatus
をインスペクションします。
response
- インスペクションするレスポンス true
。それ以外の場合は false
IOExceptionSE
- I/O エラーの場合 void handleError(ClientHttpResponse response) throws IOExceptionSE
このメソッドは、hasError(ClientHttpResponse)
が true
を返したときにのみ呼び出されます。
response
- エラーのあるレスポンス IOExceptionSE
- I/O エラーの場合 default void handleError(URISE url, HttpMethod method, ClientHttpResponse response) throws IOExceptionSE
handleError(ClientHttpResponse)
の代替。url
- リクエスト URLmethod
- HTTP メソッド response
- エラーのあるレスポンス IOExceptionSE
- I/O エラーの場合