クラス Health
java.lang.ObjectSE
org.springframework.boot.actuate.health.HealthComponent
org.springframework.boot.actuate.health.Health
- 実装されているすべてのインターフェース:
OperationResponseBody
コンポーネントまたはサブシステムの状態に関する情報を伝達します。
HealthComponent を拡張して、システムに関する追加のコンテキスト詳細を Status とともに返すことができるようにします。Health インスタンスは、Health.Builder の Fluent API を使用して作成できます。HealthIndicator の一般的な使用箇所は次のとおりです。
try {
// do some test to determine state of component
return Health.up().withDetail("version", "1.1.2").build();
}
catch (Exception ex) {
return Health.down(ex).build();
}
- 導入:
- 1.1.0
- 作成者:
- Christian Dupuis, Phillip Webb, Michael Pratt
ネストされたクラスの要約
ネストされたクラスメソッドのサマリー
修飾子と型メソッド説明static Health.Builderdown()Status.DOWNステータスで新しいHealth.Builderインスタンスを作成します。static Health.Builderdown(ThrowableSE ex) Status.DOWNステータスと指定された例外詳細で新しいHealth.Builderインスタンスを作成します。booleanヘルスの詳細を返します。ヘルスのステータスを返します。inthashCode()static Health.BuilderStatus.OUT_OF_SERVICEステータスで新しいHealth.Builderインスタンスを作成します。static Health.Builder特定のステータスコードで新しいHealth.Builderインスタンスを作成します。static Health.Builder特定のStatusで新しいHealth.Builderインスタンスを作成します。toString()static Health.Builderunknown()Status.UNKNOWNステータスで新しいHealth.Builderインスタンスを作成します。static Health.Builderup()Status.UPステータスで新しいHealth.Builderインスタンスを作成します。
メソッドの詳細
getStatus
ヘルスのステータスを返します。- 次で指定:
- クラス
HealthComponentのgetStatus - 戻り値:
- ステータス (非
null)
getDetails
ヘルスの詳細を返します。- 戻り値:
- 詳細 (または空のマップ)
equals
hashCode
public int hashCode()toString
unknown
Status.UNKNOWNステータスで新しいHealth.Builderインスタンスを作成します。- 戻り値:
- 新しい
Health.Builderインスタンス
up
Status.UPステータスで新しいHealth.Builderインスタンスを作成します。- 戻り値:
- 新しい
Health.Builderインスタンス
down
Status.DOWNステータスと指定された例外詳細で新しいHealth.Builderインスタンスを作成します。- パラメーター:
ex- 例外- 戻り値:
- 新しい
Health.Builderインスタンス
down
Status.DOWNステータスで新しいHealth.Builderインスタンスを作成します。- 戻り値:
- 新しい
Health.Builderインスタンス
outOfService
Status.OUT_OF_SERVICEステータスで新しいHealth.Builderインスタンスを作成します。- 戻り値:
- 新しい
Health.Builderインスタンス
status
特定のステータスコードで新しいHealth.Builderインスタンスを作成します。- パラメーター:
statusCode- ステータスコード- 戻り値:
- 新しい
Health.Builderインスタンス
status
特定のStatusで新しいHealth.Builderインスタンスを作成します。- パラメーター:
status- ステータス- 戻り値:
- 新しい
Health.Builderインスタンス