public class JsonErrorResponseHandler extends java.lang.Object implements HttpResponseHandler<AmazonServiceException>
| コンストラクタと説明 |
|---|
JsonErrorResponseHandler(java.util.List<com.amazonaws.transform.Unmarshaller<AmazonServiceException,JSONObject>> exceptionUnmarshallers) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
AmazonServiceException |
handle(HttpResponse response)
HTTP レスポンスオブジェクトを受け入れ、 T 型のオブジェクトを返します。
|
boolean |
needsConnectionLeftOpen()
この応答ハンドラのリクエストは、応答が処理された後、自動的に基本的な HTTP コネクションが閉じられないかどうかを示します。
|
protected AmazonServiceException |
runErrorUnmarshallers(HttpResponse errorResponse,
JSONObject json) |
public JsonErrorResponseHandler(java.util.List<com.amazonaws.transform.Unmarshaller<AmazonServiceException,JSONObject>> exceptionUnmarshallers)
public AmazonServiceException handle(HttpResponse response) throws java.lang.Exception
HttpResponseHandlerhandle インタフェース内 HttpResponseHandler<AmazonServiceException>response - The HTTP response to handle, as received from an AWS service.java.lang.Exception - If any problems are encountered handling the response.protected AmazonServiceException runErrorUnmarshallers(HttpResponse errorResponse, JSONObject json) throws java.lang.Exception
java.lang.Exceptionpublic boolean needsConnectionLeftOpen()
HttpResponseHandler
例えば、HTTP コネクションからのストリームのデータを手動で処理され、
HttpResponseHandler.handle(HttpResponse) メソッド内のすべてのデータを読んでいないレスポンスが返ってきた場合、
このメソッドを、基本的なコネクションが中断されるのを防ぐために使うことができます。
応答ハンドラは、リソースのクリーンアップが自動で処理されなかったり、動作が停止してしまったり、 新しい HTTP コネクションの情報の結果がクライアントランタイムを超るようになってしまってから、 慎重にこのオプションを使う必要があります。
needsConnectionLeftOpen インタフェース内 HttpResponseHandler<AmazonServiceException>