クラス WebEndpointResponse<T>

java.lang.ObjectSE
org.springframework.boot.actuate.endpoint.web.WebEndpointResponse<T>
型パラメーター:
T - レスポンス本体の型

public final class WebEndpointResponse<T> extends ObjectSE
WebEndpointResponse は、@EndpointWebExtension の操作によって返され、HTTP ステータスコードなどの追加の Web 固有の情報を提供できます。
導入:
2.0.0
作成者:
Stephane Nicoll, Andy Wilkinson, Vedran Pavic
  • フィールドの詳細

  • コンストラクターの詳細

    • WebEndpointResponse

      public WebEndpointResponse()
      本体がなく、ステータスが 200(OK)の新しい WebEndpointResponse を作成します。
    • WebEndpointResponse

      public WebEndpointResponse(int status)
      ボディがなく、指定された status を持つ新しい WebEndpointResponse を作成します。
      パラメーター:
      status - HTTP ステータス
    • WebEndpointResponse

      public WebEndpointResponse(T body)
      指定された本文と 200 (OK) ステータスで新しい WebEndpointResponse を作成します。
      パラメーター:
      body - 体
    • WebEndpointResponse

      public WebEndpointResponse(T body, Producible<?> producible)
      指定された本文とコンテンツ型、および 200 (OK) ステータスで新しい WebEndpointResponse を作成します。
      パラメーター:
      body - 体
      producible - コンテンツ型を提供する生産物
      導入:
      2.5.0
    • WebEndpointResponse

      public WebEndpointResponse(T body, MimeType contentType)
      指定された本文とコンテンツ型、および 200 (OK) ステータスで新しい WebEndpointResponse を作成します。
      パラメーター:
      body - 体
      contentType - レスポンスのコンテンツ型
      導入:
      2.5.0
    • WebEndpointResponse

      public WebEndpointResponse(T body, int status)
      指定されたボディとステータスで新しい WebEndpointResponse を作成します。
      パラメーター:
      body - 体
      status - HTTP ステータス
    • WebEndpointResponse

      public WebEndpointResponse(T body, int status, MimeType contentType)
      指定されたボディとステータスで新しい WebEndpointResponse を作成します。
      パラメーター:
      body - 体
      status - HTTP ステータス
      contentType - レスポンスのコンテンツ型
      導入:
      2.5.0
  • メソッドの詳細

    • getContentType

      public MimeType getContentType()
      レスポンスのコンテンツ型を返します。
      戻り値:
      コンテンツ型。
    • getBody

      public T getBody()
      レスポンスの本文を返します。
      戻り値:
    • getStatus

      public int getStatus()
      レスポンスのステータスを返します。
      戻り値:
      ステータス