Class ErrorMessage
java.lang.Object
org.springframework.cloud.servicebroker.model.error.ErrorMessage
- All Implemented Interfaces:
Serializable
Details of an error reported to the platform from a service broker.
- Author:
- S Greenberg, Scott Frederick, Roy Clarkson
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Provides a fluent API for constructing anErrorMessage
. -
Constructor Summary
ConstructorsConstructorDescriptionConstruct an error message with no error code or description.ErrorMessage
(String message) Construct an error message with the provided description.ErrorMessage
(String error, String message) Construct an error message with the provided error code and description.ErrorMessage
(String error, String message, Boolean instanceUsable, Boolean updateRepeatable) Construct an error message. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a builder that provides a fluent API for constructing an ErrorMessage.final boolean
getError()
Get the error code.Get the description.final int
hashCode()
Get a boolean value indicating whether the instance is usable after a failed update or deprovisioning operation.Get a boolean value indicating whether a failed update is repeatable.final String
toString()
-
Constructor Details
-
ErrorMessage
public ErrorMessage()Construct an error message with no error code or description. -
ErrorMessage
Construct an error message with the provided description.- Parameters:
message
- a user-facing error message explaining why the request failed
-
ErrorMessage
Construct an error message with the provided error code and description.- Parameters:
error
- a single word in camel case that uniquely identifies the error conditionmessage
- a user-facing error message explaining why the request failed
-
ErrorMessage
Construct an error message.- Parameters:
error
- a single word in camel case that uniquely identifies the error conditionmessage
- a user-facing error message explaining why the request failedinstanceUsable
- is the instance still usable after a failed operationupdateRepeatable
- can the update be repeated after a failed operation
-
-
Method Details
-
getError
Get the error code.- Returns:
- the error code
-
getMessage
Get the description.- Returns:
- the description.
-
isInstanceUsable
Get a boolean value indicating whether the instance is usable after a failed update or deprovisioning operation.- Returns:
- the boolean value
-
isUpdateRepeatable
Get a boolean value indicating whether a failed update is repeatable.- Returns:
- the boolean value
-
builder
Create a builder that provides a fluent API for constructing an ErrorMessage.- Returns:
- the builder
-
equals
-
hashCode
public final int hashCode() -
toString
-