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