Enum HttpRetryEvent
- All Implemented Interfaces:
Serializable
,Comparable<HttpRetryEvent>
,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-09-11T18:01:11.280Z")
@Stability(Stable)
public enum HttpRetryEvent
extends Enum<HttpRetryEvent>
HTTP events on which to retry.
Example:
VirtualRouter router; VirtualNode node; router.addRoute("route-http2-retry", RouteBaseProps.builder() .routeSpec(RouteSpec.http2(HttpRouteSpecOptions.builder() .weightedTargets(List.of(WeightedTarget.builder().virtualNode(node).build())) .retryPolicy(HttpRetryPolicy.builder() // Retry if the connection failed .tcpRetryEvents(List.of(TcpRetryEvent.CONNECTION_ERROR)) // Retry if HTTP responds with a gateway error (502, 503, 504) .httpRetryEvents(List.of(HttpRetryEvent.GATEWAY_ERROR)) // Retry five times .retryAttempts(5) // Use a 1 second timeout per retry .retryTimeout(Duration.seconds(1)) .build()) .build())) .build());
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionHTTP status code 409.HTTP status codes 502, 503, and 504.HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511.Retry on refused stream. -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpRetryEvent
Returns the enum constant of this type with the specified name.static HttpRetryEvent[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
SERVER_ERROR
HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511. -
GATEWAY_ERROR
HTTP status codes 502, 503, and 504. -
CLIENT_ERROR
HTTP status code 409. -
STREAM_ERROR
Retry on refused stream.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-