Class ApiRestException.BaseBuilder<B extends ApiRestException.BaseBuilder<B>>
- java.lang.Object
-
- io.helidon.integrations.common.rest.ApiRestException.BaseBuilder<B>
-
- Type Parameters:
B
- type of the subclass
- Direct Known Subclasses:
OciRestException.Builder
,RestException.Builder
,VaultRestException.Builder
- Enclosing class:
- ApiRestException
public abstract static class ApiRestException.BaseBuilder<B extends ApiRestException.BaseBuilder<B>> extends Object
Base builder extended by specific builder class.
-
-
Constructor Summary
Constructors Constructor Description BaseBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description B
apiSpecificError(String apiSpecificError)
Error specific to the integrated system, configured by implementation of theRestApi
.B
cause(Throwable t)
Possible cause of this exception (such as when we fail to parse returned entity).B
headers(Headers headers)
HTTP headers configured byRestApi
.protected B
me()
Used to return correct type for setter methods of this builder.B
message(String message)
Message configured byRestApi
.B
requestId(String requestId)
Request ID configured byRestApi
.B
status(Http.ResponseStatus status)
HTTP status configured byRestApi
.
-
-
-
Method Detail
-
message
public B message(String message)
Message configured byRestApi
.- Parameters:
message
- message with explanation of exception- Returns:
- updated builder
-
requestId
public B requestId(String requestId)
Request ID configured byRestApi
.- Parameters:
requestId
- request ID- Returns:
- updated builder
-
status
public B status(Http.ResponseStatus status)
HTTP status configured byRestApi
.- Parameters:
status
- returned status- Returns:
- updated builder
-
headers
public B headers(Headers headers)
HTTP headers configured byRestApi
.- Parameters:
headers
- returned headers- Returns:
- updated builder
-
apiSpecificError
public B apiSpecificError(String apiSpecificError)
Error specific to the integrated system, configured by implementation of theRestApi
.- Parameters:
apiSpecificError
- specific exception- Returns:
- updated builder
-
cause
public B cause(Throwable t)
Possible cause of this exception (such as when we fail to parse returned entity).- Parameters:
t
- cause of the new throwable- Returns:
- updated builder
-
me
protected B me()
Used to return correct type for setter methods of this builder.- Returns:
- instance of this class typed as the subclass
-
-