public enum ResponseErrorBmcExceptionFactory extends Enum<ResponseErrorBmcExceptionFactory> implements ResponseErrorRuntimeExceptionFactory<ResponseHelper.ErrorCodeAndMessage,BmcException>
Default ResponseErrorRuntimeExceptionFactory
implementation that knows how to deserialize
error responses using the ResponseHelper.ErrorCodeAndMessage
model. When an error
response is received and deserialized, a BmcException
is thrown, allowing access to the
error object.
Enum Constant and Description |
---|
INSTANCE
The single stateless ResponseErrorBmcExceptionFactory instance.
|
Modifier and Type | Method and Description |
---|---|
BmcException |
createRuntimeException(int statusCode,
String opcRequestId,
ResponseHelper.ErrorCodeAndMessage errorResponse,
ServiceDetails serviceDetails) |
BmcException |
createRuntimeException(int statusCode,
String serviceCode,
String message,
String opcRequestId,
ServiceDetails serviceDetails) |
BmcException |
createRuntimeException(int statusCode,
String serviceCode,
String message,
String opcRequestId,
Throwable cause,
ServiceDetails serviceDetails) |
Class<ResponseHelper.ErrorCodeAndMessage> |
getResponseErrorModelType() |
static ResponseErrorBmcExceptionFactory |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ResponseErrorBmcExceptionFactory[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ResponseErrorBmcExceptionFactory INSTANCE
public static ResponseErrorBmcExceptionFactory[] values()
for (ResponseErrorBmcExceptionFactory c : ResponseErrorBmcExceptionFactory.values()) System.out.println(c);
public static ResponseErrorBmcExceptionFactory valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Class<ResponseHelper.ErrorCodeAndMessage> getResponseErrorModelType()
getResponseErrorModelType
in interface ResponseErrorRuntimeExceptionFactory<ResponseHelper.ErrorCodeAndMessage,BmcException>
ResponseHelper.ErrorCodeAndMessage
class
object.public BmcException createRuntimeException(int statusCode, String opcRequestId, ResponseHelper.ErrorCodeAndMessage errorResponse, ServiceDetails serviceDetails)
createRuntimeException
in interface ResponseErrorRuntimeExceptionFactory<ResponseHelper.ErrorCodeAndMessage,BmcException>
public BmcException createRuntimeException(int statusCode, String serviceCode, String message, String opcRequestId, ServiceDetails serviceDetails)
createRuntimeException
in interface ResponseErrorRuntimeExceptionFactory<ResponseHelper.ErrorCodeAndMessage,BmcException>
public BmcException createRuntimeException(int statusCode, String serviceCode, String message, String opcRequestId, Throwable cause, ServiceDetails serviceDetails)
createRuntimeException
in interface ResponseErrorRuntimeExceptionFactory<ResponseHelper.ErrorCodeAndMessage,BmcException>
Copyright © 2016–2024. All rights reserved.