Class Health.Builder
- java.lang.Object
-
- io.streamthoughts.azkarra.http.health.Health.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
Creates a newHealth.Builder
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Health
build()
Builds a newHealth
instance.Health.Builder
down()
Sets the status for theHealth
indicator to be built toStatus.DOWN
.Health.Builder
unknown()
Sets the status for theHealth
indicator to be builtStatus.UNKNOWN
.Health.Builder
up()
Health.Builder
withDetails(String key, Object value)
Adds a details entry for theHealth
indicator.Health.Builder
withException(Throwable exception)
Sets the exception for theHealth
indicator.Health.Builder
withName(String name)
Sets the name of service or sub-system.Health.Builder
withStatus(Status status)
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a newHealth.Builder
instance.
-
-
Method Detail
-
down
public Health.Builder down()
Sets the status for theHealth
indicator to be built toStatus.DOWN
.- Returns:
- this
Health.Builder
instance.
-
up
public Health.Builder up()
- Returns:
- this
Health.Builder
instance.
-
unknown
public Health.Builder unknown()
Sets the status for theHealth
indicator to be builtStatus.UNKNOWN
.- Returns:
- this
Health.Builder
instance.
-
withName
public Health.Builder withName(String name)
Sets the name of service or sub-system.- Parameters:
name
- the name.- Returns:
- this
Health.Builder
instance.
-
withDetails
public Health.Builder withDetails(String key, Object value)
Adds a details entry for theHealth
indicator.- Parameters:
key
- the detail key.value
- the detail value.- Returns:
- this
Health.Builder
instance.
-
withException
public Health.Builder withException(Throwable exception)
Sets the exception for theHealth
indicator.- Parameters:
exception
- the exception.- Returns:
- this
Health.Builder
instance.
-
withStatus
public Health.Builder withStatus(Status status)
- Parameters:
status
- the status.- Returns:
- this
Health.Builder
instance.
-
-