Constructor and Description |
---|
Health.Builder()
Create new Builder instance.
|
Health.Builder(Status status)
Create new Builder instance, setting status to given
status . |
Health.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 data)
Record detail using
key and value . |
Health.Builder |
withException(Exception ex)
Record detail for given
Exception . |
public Health.Builder()
public Health.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 data)
key
and value
.key
- the detail keydata
- the detail dataHealth.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
.Health.Builder
instancepublic Health.Builder status(Status status)
Status
instancestatus
- Health.Builder
instanceCopyright © 2014 Pivotal Software, Inc.. All rights reserved.