JavaTM Platform
Standard Ed. 6

java.net
クラス HttpRetryException

java.lang.Object
  上位を拡張 java.lang.Throwable
      上位を拡張 java.lang.Exception
          上位を拡張 java.io.IOException
              上位を拡張 java.net.HttpRetryException
すべての実装されたインタフェース:
Serializable

public class HttpRetryException
extends IOException

HTTP 要求を再試行する必要があるが、ストリーミングモードが有効になっているために自動的に再試行できないことを示すために、スローされます。

導入されたバージョン:
1.5
関連項目:
直列化された形式

コンストラクタの概要
HttpRetryException(String detail, int code)
          指定された応答コードと例外詳細メッセージから、新しい HttpRetryException を構築します。
HttpRetryException(String detail, int code, String location)
          詳細メッセージ、応答コード、および Location 応答ヘッダーフィールドの内容に基づいて、新しい HttpRetryException を構築します。
 
メソッドの概要
 String getLocation()
          リダイレクションが原因でエラーが発生した場合に、Location ヘッダーフィールドの値を返します。
 String getReason()
          HTTP 要求を再試行できなかった理由を説明する文字列を返します。
 int responseCode()
          HTTP 応答コードを返します。
 
クラス java.lang.Throwable から継承されたメソッド
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

HttpRetryException

public HttpRetryException(String detail,
                          int code)
指定された応答コードと例外詳細メッセージから、新しい HttpRetryException を構築します。

パラメータ:
detail - 詳細メッセージ
code - サーバーからの HTTP 応答コード

HttpRetryException

public HttpRetryException(String detail,
                          int code,
                          String location)
詳細メッセージ、応答コード、および Location 応答ヘッダーフィールドの内容に基づいて、新しい HttpRetryException を構築します。

パラメータ:
detail - 詳細メッセージ
code - サーバーからの HTTP 応答コード
location - リダイレクト先の URL
メソッドの詳細

responseCode

public int responseCode()
HTTP 応答コードを返します。

戻り値:
HTTP 応答コード

getReason

public String getReason()
HTTP 要求を再試行できなかった理由を説明する文字列を返します。

戻り値:
理由文字列

getLocation

public String getLocation()
リダイレクションが原因でエラーが発生した場合に、Location ヘッダーフィールドの値を返します。

戻り値:
場所の文字列

JavaTM Platform
Standard Ed. 6

バグの報告と機能のリクエスト
さらに詳しい API リファレンスおよび開発者ドキュメントについては、Java SE 開発者用ドキュメントを参照してください。開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、およびコード実例が含まれています。

Copyright 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。