|
1 | 1 | /* |
2 | | - * Copyright (c) 2020, 2022 Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2020, 2025 Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * |
4 | 4 | * This program and the accompanying materials are made available under the |
5 | 5 | * terms of the Eclipse Public License v. 2.0, which is available at |
|
13 | 13 | * |
14 | 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
15 | 15 | */ |
| 16 | + |
16 | 17 | package org.glassfish.jersey.helidon.connector; |
17 | 18 |
|
18 | | -import io.helidon.jersey.connector.HelidonProperties; |
| 19 | +import io.helidon.common.tls.Tls; |
| 20 | +import io.helidon.config.Config; |
| 21 | +import io.helidon.webclient.api.WebClient; |
19 | 22 | import org.glassfish.jersey.internal.util.PropertiesClass; |
20 | 23 |
|
21 | | -import io.helidon.config.Config; |
22 | | -import io.helidon.webclient.WebClient; |
| 24 | +import java.util.List; |
| 25 | +import java.util.Map; |
23 | 26 |
|
24 | 27 | /** |
25 | 28 | * Configuration options specific to the Client API that utilizes {@code HelidonConnectorProvider}. |
|
28 | 31 | @PropertiesClass |
29 | 32 | public final class HelidonClientProperties { |
30 | 33 |
|
| 34 | + private HelidonClientProperties() { |
| 35 | + } |
| 36 | + |
| 37 | + /** |
| 38 | + * Property name to set a {@link Config} instance to by used by underlying {@link WebClient}. |
| 39 | + * This property is settable on {@link jakarta.ws.rs.core.Configurable#property(String, Object)}. |
| 40 | + * |
| 41 | + * @see io.helidon.webclient.api.WebClientConfig.Builder#config(io.helidon.common.config.Config) |
| 42 | + */ |
| 43 | + public static final String CONFIG = "jersey.connector.helidon.config"; |
| 44 | + |
| 45 | + /** |
| 46 | + * Property name to set a {@link Tls} instance to be used by underlying {@link WebClient}. |
| 47 | + * This property is settable on {@link jakarta.ws.rs.core.Configurable#property(String, Object)}. |
| 48 | + * |
| 49 | + * @see io.helidon.webclient.api.WebClientConfig.Builder#tls(Tls) |
| 50 | + */ |
| 51 | + public static final String TLS = "jersey.connector.helidon.tls"; |
| 52 | + |
| 53 | + /** |
| 54 | + * Property name to set a {@code List<? extends ProtocolConfig>} instance with a list of |
| 55 | + * protocol configs to be used by underlying {@link WebClient}. |
| 56 | + * This property is settable on {@link jakarta.ws.rs.core.Configurable#property(String, Object)}. |
| 57 | + * |
| 58 | + * @see io.helidon.webclient.api.WebClientConfig.Builder#protocolConfigs(List) |
| 59 | + */ |
| 60 | + public static final String PROTOCOL_CONFIGS = "jersey.connector.helidon.protocolConfigs"; |
| 61 | + |
| 62 | + /** |
| 63 | + * Property name to set a {@code Map<String, String>} instance with a list of |
| 64 | + * default headers to be used by underlying {@link WebClient}. |
| 65 | + * This property is settable on {@link jakarta.ws.rs.core.Configurable#property(String, Object)}. |
| 66 | + * |
| 67 | + * @see io.helidon.webclient.api.WebClientConfig.Builder#defaultHeadersMap(Map) |
| 68 | + */ |
| 69 | + public static final String DEFAULT_HEADERS = "jersey.connector.helidon.defaultHeaders"; |
| 70 | + |
| 71 | + /** |
| 72 | + * Property name to set a protocol ID for each request. You can use this property |
| 73 | + * to request an HTTP/2 upgrade from HTTP/1.1 by setting its value to {@code "h2"}. |
| 74 | + * When using TLS, Helidon uses negotiation via the ALPN extension instead of this |
| 75 | + * property. |
| 76 | + * |
| 77 | + * @see io.helidon.webclient.api.HttpClientRequest#protocolId(String) |
| 78 | + */ |
| 79 | + public static final String PROTOCOL_ID = "jersey.connector.helidon.protocolId"; |
| 80 | + |
31 | 81 | /** |
32 | | - * A Helidon {@link Config} instance that is passed to {@link WebClient.Builder#config(Config)} if available |
| 82 | + * Property name to enable or disable connection caching in the underlying {@link WebClient}. |
| 83 | + * The default for the Helidon connector is {@code false}, or no sharing (which is the |
| 84 | + * opposite of {@link WebClient}). Set this property to {@code true} to enable connection |
| 85 | + * caching. |
| 86 | + * |
| 87 | + * @see io.helidon.webclient.api.WebClientConfig.Builder#shareConnectionCache(boolean) |
33 | 88 | */ |
34 | | - public static final String CONFIG = HelidonProperties.CONFIG; |
| 89 | + public static final String SHARE_CONNECTION_CACHE = "jersey.connector.helidon.shareConnectionCache"; |
35 | 90 | } |
0 commit comments