1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 package org.eclipse.aether.transport.apache; 20 21 import org.eclipse.aether.ConfigurationProperties; 22 import org.eclipse.aether.RepositorySystemSession; 23 24 /** 25 * Configuration for Apache Transport. 26 * 27 * @since 2.0.0 28 */ 29 public final class ApacheTransporterConfigurationKeys { 30 private ApacheTransporterConfigurationKeys() {} 31 32 static final String CONFIG_PROPS_PREFIX = 33 ConfigurationProperties.PREFIX_TRANSPORT + ApacheTransporterFactory.NAME + "."; 34 35 /** 36 * If enabled, underlying Apache HttpClient will use system properties as well to configure itself (typically 37 * used to set up HTTP Proxy via Java system properties). See HttpClientBuilder for used properties. This mode 38 * is not recommended, better use documented ways of configuration instead. 39 * 40 * @configurationSource {@link RepositorySystemSession#getConfigProperties()} 41 * @configurationType {@link java.lang.Boolean} 42 * @configurationDefaultValue {@link #DEFAULT_USE_SYSTEM_PROPERTIES} 43 * @configurationRepoIdSuffix Yes 44 */ 45 public static final String CONFIG_PROP_USE_SYSTEM_PROPERTIES = CONFIG_PROPS_PREFIX + "useSystemProperties"; 46 47 public static final boolean DEFAULT_USE_SYSTEM_PROPERTIES = false; 48 49 /** 50 * The name of retryHandler, supported values are “standard”, that obeys RFC-2616, regarding idempotent methods, 51 * and “default” that considers requests w/o payload as idempotent. 52 * 53 * @configurationSource {@link RepositorySystemSession#getConfigProperties()} 54 * @configurationType {@link java.lang.String} 55 * @configurationDefaultValue {@link #HTTP_RETRY_HANDLER_NAME_STANDARD} 56 * @configurationRepoIdSuffix Yes 57 */ 58 public static final String CONFIG_PROP_HTTP_RETRY_HANDLER_NAME = CONFIG_PROPS_PREFIX + "retryHandler.name"; 59 60 public static final String HTTP_RETRY_HANDLER_NAME_STANDARD = "standard"; 61 62 public static final String HTTP_RETRY_HANDLER_NAME_DEFAULT = "default"; 63 64 /** 65 * Set to true if it is acceptable to retry non-idempotent requests, that have been sent. 66 * 67 * @configurationSource {@link RepositorySystemSession#getConfigProperties()} 68 * @configurationType {@link java.lang.Boolean} 69 * @configurationDefaultValue {@link #DEFAULT_HTTP_RETRY_HANDLER_REQUEST_SENT_ENABLED} 70 * @configurationRepoIdSuffix Yes 71 */ 72 public static final String CONFIG_PROP_HTTP_RETRY_HANDLER_REQUEST_SENT_ENABLED = 73 CONFIG_PROPS_PREFIX + "retryHandler.requestSentEnabled"; 74 75 public static final boolean DEFAULT_HTTP_RETRY_HANDLER_REQUEST_SENT_ENABLED = false; 76 77 /** 78 * Comma-separated list of 79 * <a href="https://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#ciphersuites">Cipher 80 * Suites</a> which are enabled for HTTPS connections. 81 * 82 * @since 2.0.0 83 * @configurationSource {@link RepositorySystemSession#getConfigProperties()} 84 * @configurationType {@link java.lang.String} 85 */ 86 public static final String CONFIG_PROP_CIPHER_SUITES = CONFIG_PROPS_PREFIX + "https.cipherSuites"; 87 88 /** 89 * Comma-separated list of 90 * <a href="https://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#jssenames">Protocols 91 * </a> which are enabled for HTTPS connections. 92 * 93 * @since 2.0.0 94 * @configurationSource {@link RepositorySystemSession#getConfigProperties()} 95 * @configurationType {@link java.lang.String} 96 */ 97 public static final String CONFIG_PROP_PROTOCOLS = CONFIG_PROPS_PREFIX + "https.protocols"; 98 }