public class BrokerErrorResponse extends Object
Constructor and Description |
---|
BrokerErrorResponse(BrokerError error,
String message)
Create the error response with the given error and message.
|
BrokerErrorResponse(String code,
String message)
Create the error response with the given code and message.
|
Modifier and Type | Method and Description |
---|---|
String |
getCode()
Get the error responses code.
|
BrokerError |
getError()
Get the
BrokerError that matches getCode() . |
String |
getMessage()
Get the error responses message.
|
String |
toString()
Returns a nice
String representation of the object for logging or debugging purposes. |
public BrokerErrorResponse(BrokerError error, String message)
error
- the error of the responsemessage
- the message of the error responsepublic String getCode()
NOTE: this will be null if there is no code from the server.
public BrokerError getError()
BrokerError
that matches getCode()
.
NOTE: if the code is not found BrokerError.Unknown
will be returned.
BrokerError
that matches getCode()
public String getMessage()
NOTE: this will be null if there is no message from the server.
Copyright © 2021. All rights reserved.