@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-28T21:34:27.840Z") public enum HttpRouteProtocol extends java.lang.Enum<HttpRouteProtocol>
Example:
VirtualRouter router; VirtualNode node; router.addRoute("route-http2", RouteBaseProps.builder() .routeSpec(RouteSpec.http2(HttpRouteSpecOptions.builder() .weightedTargets(List.of(WeightedTarget.builder() .virtualNode(node) .build())) .match(HttpRouteMatch.builder() .path(HttpRoutePathMatch.exactly("/exact")) .method(HttpRouteMethod.POST) .protocol(HttpRouteProtocol.HTTPS) .headers(List.of(HeaderMatch.valueIs("Content-Type", "application/json"), HeaderMatch.valueIsNot("Content-Type", "application/json"))) .queryParameters(List.of(QueryParameterMatch.valueIs("query-field", "value"))) .build()) .build())) .build());
Enum Constant and Description |
---|
HTTP
Match HTTP requests.
|
HTTPS
Match HTTPS requests.
|
Modifier and Type | Method and Description |
---|---|
static HttpRouteProtocol |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static HttpRouteProtocol[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HttpRouteProtocol HTTP
public static final HttpRouteProtocol HTTPS
public static HttpRouteProtocol[] values()
for (HttpRouteProtocol c : HttpRouteProtocol.values()) System.out.println(c);
public static HttpRouteProtocol valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null