java.lang.Object
io.helidon.http.RequestException.Builder
- All Implemented Interfaces:
Builder<RequestException.Builder,
,RequestException> Supplier<RequestException>
- Enclosing class:
RequestException
public static class RequestException.Builder
extends Object
implements Builder<RequestException.Builder,RequestException>
Fluent API builder for
RequestException
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the instance from this builder.Cause of the exception.Response header to be added to error response.Descriptive error message.request
(DirectHandler.TransportRequest request) Transport request with as much information as is available.safeMessage
(boolean safeMessage) Safe message flag that indicates if it safe to return message as part of the response.setKeepAlive
(boolean keepAlive) Override default keep alive for this exception.Http status to use.type
(DirectHandler.EventType type) Event type of this exception.
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<RequestException.Builder,
RequestException> - Returns:
- instance of the built type
-
message
Descriptive error message.- Parameters:
message
- message- Returns:
- updated builder
-
cause
Cause of the exception.- Parameters:
cause
- cause- Returns:
- updated builder
-
request
Transport request with as much information as is available.- Parameters:
request
- request to use- Returns:
- updated builder
-
type
Event type of this exception.- Parameters:
type
- type to use- Returns:
- updated builder
-
status
Http status to use. This will override default status fromDirectHandler.EventType.defaultStatus()
.- Parameters:
status
- status to use- Returns:
- updated builder
-
setKeepAlive
Override default keep alive for this exception.- Parameters:
keepAlive
- whether to keep connection alive- Returns:
- updated builder
-
header
Response header to be added to error response.- Parameters:
header
- header to add- Returns:
- updated builder
-
safeMessage
Safe message flag that indicates if it safe to return message as part of the response. Defaults totrue
.- Parameters:
safeMessage
- whether is safe to return message- Returns:
- updated builder
-