Constructor and Description |
---|
Builder()
Create new Builder instance.
|
Builder(Status status)
Create new Builder instance, setting status to given
status . |
Builder(Status status,
Map<String,?> details)
Create new Builder instance, setting status to given
status and details
to given details . |
Modifier and Type | Method and Description |
---|---|
Health |
build()
Create a new
Health instance with the previously specified code and
details. |
Health.Builder |
down()
Set status to
Status.DOWN . |
Health.Builder |
down(Exception ex)
Set status to
Status.DOWN and add details for given Exception . |
Health.Builder |
outOfService()
Set status to
Status.OUT_OF_SERVICE . |
Health.Builder |
status(Status status)
Set status to given
Status instance. |
Health.Builder |
status(String statusCode)
Set status to given
statusCode . |
Health.Builder |
unknown()
Set status to
Status.UNKNOWN status. |
Health.Builder |
up()
Set status to
Status.UP status. |
Health.Builder |
withDetail(String key,
Object value)
Record detail using given
key and value . |
Health.Builder |
withException(Exception ex)
Record detail for given
Exception . |
public Builder()
public Builder(Status status)
status
.status
- the Status
to usepublic Health.Builder withException(Exception ex)
Exception
.ex
- the exceptionHealth.Builder
instancepublic Health.Builder withDetail(String key, Object value)
key
and value
.key
- the detail keyvalue
- the detail valueHealth.Builder
instancepublic Health.Builder unknown()
Status.UNKNOWN
status.Health.Builder
instancepublic Health.Builder up()
Status.UP
status.Health.Builder
instancepublic Health.Builder down(Exception ex)
Status.DOWN
and add details for given Exception
.ex
- the exceptionHealth.Builder
instancepublic Health.Builder down()
Status.DOWN
.Health.Builder
instancepublic Health.Builder outOfService()
Status.OUT_OF_SERVICE
.Health.Builder
instancepublic Health.Builder status(String statusCode)
statusCode
.statusCode
- the status codeHealth.Builder
instancepublic Health.Builder status(Status status)
Status
instance.status
- the statusHealth.Builder
instanceCopyright © 2017 Pivotal Software, Inc.. All rights reserved.