Enum Class HttpResponse.Status

java.lang.Object
java.lang.Enum<HttpResponse.Status>
nablarch.fw.web.HttpResponse.Status
All Implemented Interfaces:
Serializable, Comparable<HttpResponse.Status>, Constable, Handler<HttpRequest,HttpResponse>, HttpRequestHandler
Enclosing class:
HttpResponse

@Published public static enum HttpResponse.Status extends Enum<HttpResponse.Status> implements HttpRequestHandler
HTTPレスポンスステータス。
 HTTPレスポンスフォーマットにおけるHTTPステータスコード・ステータスフレーズの値と
 それに関連する責務を実装したEnum
  • Enum Constant Details

    • CONTINUE

      public static final HttpResponse.Status CONTINUE
      継続
    • OK

      public static final HttpResponse.Status OK
      正常終了
    • CREATED

      public static final HttpResponse.Status CREATED
      正常終了:リソースが正常に作成された。
    • ACCEPTED

      public static final HttpResponse.Status ACCEPTED
      正常終了:処理の受付が完了した。(後続処理がある場合)
    • NO_CONTENT

      public static final HttpResponse.Status NO_CONTENT
      内容なし
    • RESET_CONTENT

      public static final HttpResponse.Status RESET_CONTENT
      内容のリセット
    • PARTIAL_CONTENT

      public static final HttpResponse.Status PARTIAL_CONTENT
      部分的内容
    • MOVED_PERMANENTLY

      public static final HttpResponse.Status MOVED_PERMANENTLY
      恒久的に移動した。
    • FOUND

      public static final HttpResponse.Status FOUND
      リダイレクト
    • SEE_OTHER

      public static final HttpResponse.Status SEE_OTHER
      リダイレクト
    • NOT_MODIFIED

      public static final HttpResponse.Status NOT_MODIFIED
      コンテンツに変更が無い。
    • USE_PROXY

      public static final HttpResponse.Status USE_PROXY
      プロキシを使用せよ。
    • TEMPORARY_REDIRECT

      public static final HttpResponse.Status TEMPORARY_REDIRECT
      一時的リダイレクト
    • BAD_REQUEST

      public static final HttpResponse.Status BAD_REQUEST
      ユーザエラー:リクエストの内容に問題があるので処理を継続できない。
    • UNAUTHORIZED

      public static final HttpResponse.Status UNAUTHORIZED
      未認証
    • PAYMENT_REQUIRED

      public static final HttpResponse.Status PAYMENT_REQUIRED
      支払いが必要である。
    • FORBIDDEN

      public static final HttpResponse.Status FORBIDDEN
      認証・認可エラー
    • NOT_FOUND

      public static final HttpResponse.Status NOT_FOUND
      ユーザエラー:リクエストURIに相当するリソースが存在しない。
    • METHOD_NOT_ALLOWED

      public static final HttpResponse.Status METHOD_NOT_ALLOWED
      許可されていないメソッド
    • NOT_ACCEPTABLE

      public static final HttpResponse.Status NOT_ACCEPTABLE
      受理できない。
    • PROXY_AUTHENTICATION_REQUIRED

      public static final HttpResponse.Status PROXY_AUTHENTICATION_REQUIRED
      プロキシ認証が必要である。
    • REQUEST_TIMEOUT

      public static final HttpResponse.Status REQUEST_TIMEOUT
      リクエストタイムアウト
    • CONFLICT

      public static final HttpResponse.Status CONFLICT
      リソース競合エラー
    • GONE

      public static final HttpResponse.Status GONE
      消滅した。
    • LENGTH_REQUIRED

      public static final HttpResponse.Status LENGTH_REQUIRED
      長さが必要。
    • PRECONDITION_FAILED

      public static final HttpResponse.Status PRECONDITION_FAILED
      前提条件で失敗した。
    • REQUEST_ENTITY_TOO_LARGE

      public static final HttpResponse.Status REQUEST_ENTITY_TOO_LARGE
      リクエストエンティティが大きすぎる。
    • REQUEST_URI_TOO_LONG

      public static final HttpResponse.Status REQUEST_URI_TOO_LONG
      URIが大きすぎる。
    • UNSUPPORTED_MEDIA_TYPE

      public static final HttpResponse.Status UNSUPPORTED_MEDIA_TYPE
      サポートしていないメディアタイプ
    • REQUESTED_RANGE_NOT_SATISFIABLE

      public static final HttpResponse.Status REQUESTED_RANGE_NOT_SATISFIABLE
      レンジは範囲外にある。
    • EXPECTATION_FAILED

      public static final HttpResponse.Status EXPECTATION_FAILED
      Expectヘッダによる拡張が失敗。
    • INTERNAL_SERVER_ERROR

      public static final HttpResponse.Status INTERNAL_SERVER_ERROR
      システムエラー:システム上の問題が発生したため処理を継続できない。
    • NOT_IMPLEMENTED

      public static final HttpResponse.Status NOT_IMPLEMENTED
      実装されていない。
    • BAD_GATEWAY

      public static final HttpResponse.Status BAD_GATEWAY
      不正なゲートウェイ
    • SERVICE_UNAVAILABLE

      public static final HttpResponse.Status SERVICE_UNAVAILABLE
      システムエラー:サービスを一時的に停止している。
    • GATEWAY_TIMEOUT

      public static final HttpResponse.Status GATEWAY_TIMEOUT
      ゲートウェイタイムアウト
    • HTTP_VERSION_NOT_SUPPORTED

      public static final HttpResponse.Status HTTP_VERSION_NOT_SUPPORTED
      サポートしていないHTTPバージョン
  • Method Details

    • values

      public static HttpResponse.Status[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static HttpResponse.Status valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • valueOfCode

      public static HttpResponse.Status valueOfCode(int code) throws IllegalArgumentException
      指定されたステータスコードに対するStatusオブジェクトを返す。
      Parameters:
      code - HTTPステータスコード
      Returns:
      Statusオブジェクト
      Throws:
      IllegalArgumentException - ステータスコードがStatusオブジェクトに含まれていない場合
    • handle

      public HttpResponse handle(HttpRequest req, ExecutionContext ctx)
      入力データに対する処理を実行する。

      このクラスの実装では、以下のHTTPレスポンスメッセージに相当する HttpResponseオブジェクトを返す。

           HTTP/1.1 (ステータスコード) (ステータスフレーズ)
           Content-Type: text/plain;charset=UTF-8
       
      Specified by:
      handle in interface Handler<HttpRequest,HttpResponse>
      Specified by:
      handle in interface HttpRequestHandler
      Parameters:
      req - 入力データ
      ctx - 実行コンテキスト
      Returns:
      本オブジェクト
    • getStatusCode

      public int getStatusCode()
      HTTPステータスコードを取得する。
      Returns:
      HTTPステータスコード