azure-docs-sdk-java/docs-ref-autogen/com.azure.core.http.ProxyOp...

161 строка
13 KiB
YAML
Исходник Обычный вид История

### YamlMime:JavaType
uid: "com.azure.core.http.ProxyOptions"
fullName: "com.azure.core.http.ProxyOptions"
name: "ProxyOptions"
nameWithType: "ProxyOptions"
summary: "Represents the proxy configuration to be used in HTTP clients."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public class **ProxyOptions**"
constructors:
- uid: "com.azure.core.http.ProxyOptions.ProxyOptions(com.azure.core.http.ProxyOptions.Type,java.net.InetSocketAddress)"
fullName: "com.azure.core.http.ProxyOptions.ProxyOptions(ProxyOptions.Type type, InetSocketAddress address)"
name: "ProxyOptions(ProxyOptions.Type type, InetSocketAddress address)"
nameWithType: "ProxyOptions.ProxyOptions(ProxyOptions.Type type, InetSocketAddress address)"
summary: "Creates Proxy<wbr>Options."
parameters:
- description: "the proxy type"
name: "type"
type: "<xref href=\"com.azure.core.http.ProxyOptions.Type?alt=com.azure.core.http.ProxyOptions.Type&text=Type\" data-throw-if-not-resolved=\"False\" />"
- description: "the proxy address (ip and port number)"
name: "address"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/net/InetSocketAddress.html\">InetSocketAddress</a>"
syntax: "public ProxyOptions(ProxyOptions.Type type, InetSocketAddress address)"
desc: "Creates ProxyOptions."
methods:
- uid: "com.azure.core.http.ProxyOptions.fromConfiguration(com.azure.core.util.Configuration)"
fullName: "com.azure.core.http.ProxyOptions.fromConfiguration(Configuration configuration)"
name: "fromConfiguration(Configuration configuration)"
nameWithType: "ProxyOptions.fromConfiguration(Configuration configuration)"
summary: "Attempts to load a proxy from the configuration."
modifiers:
- "static"
parameters:
- description: "The <xref uid=\"com.azure.core.util.Configuration\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Configuration\"></xref> that is used to load proxy configurations from the environment. If\n <code>null</code> is passed then <xref uid=\"com.azure.core.util.Configuration.getGlobalConfiguration()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Configuration#getGlobalConfiguration()\"></xref> will be used."
name: "configuration"
type: "<xref href=\"com.azure.core.util.Configuration?alt=com.azure.core.util.Configuration&text=Configuration\" data-throw-if-not-resolved=\"False\" />"
syntax: "public static ProxyOptions fromConfiguration(Configuration configuration)"
desc: "Attempts to load a proxy from the configuration.\n\nIf a proxy is found and loaded the proxy address is DNS resolved.\n\nEnvironment configurations are loaded in this order:\n\n1. Azure HTTPS\n2. Azure HTTP\n3. Java HTTPS\n4. Java HTTP\n\nAzure proxy configurations will be preferred over Java proxy configurations as they are more closely scoped to the purpose of the SDK. Additionally, more secure protocols, HTTPS vs HTTP, will be preferred.\n\n`null` will be returned if no proxy was found in the environment."
returns:
description: "A <xref uid=\"com.azure.core.http.ProxyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ProxyOptions\"></xref> reflecting a proxy loaded from the environment, if no proxy is found <code>null</code>\n will be returned."
type: "<xref href=\"com.azure.core.http.ProxyOptions?alt=com.azure.core.http.ProxyOptions&text=ProxyOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.core.http.ProxyOptions.fromConfiguration(com.azure.core.util.Configuration,boolean)"
fullName: "com.azure.core.http.ProxyOptions.fromConfiguration(Configuration configuration, boolean createUnresolved)"
name: "fromConfiguration(Configuration configuration, boolean createUnresolved)"
nameWithType: "ProxyOptions.fromConfiguration(Configuration configuration, boolean createUnresolved)"
summary: "Attempts to load a proxy from the environment."
modifiers:
- "static"
parameters:
- description: "The <xref uid=\"com.azure.core.util.Configuration\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Configuration\"></xref> that is used to load proxy configurations from the environment. If\n <code>null</code> is passed then <xref uid=\"com.azure.core.util.Configuration.getGlobalConfiguration()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Configuration#getGlobalConfiguration()\"></xref> will be used. If <xref uid=\"com.azure.core.util.Configuration.NONE\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Configuration#NONE\"></xref> is passed <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"IllegalArgumentException\"></xref> will be thrown."
name: "configuration"
type: "<xref href=\"com.azure.core.util.Configuration?alt=com.azure.core.util.Configuration&text=Configuration\" data-throw-if-not-resolved=\"False\" />"
- description: "Flag determining whether the returned <xref uid=\"com.azure.core.http.ProxyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ProxyOptions\"></xref> is unresolved."
name: "createUnresolved"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
syntax: "public static ProxyOptions fromConfiguration(Configuration configuration, boolean createUnresolved)"
desc: "Attempts to load a proxy from the environment.\n\nIf a proxy is found and loaded, the proxy address is DNS resolved based on `createUnresolved`. When `createUnresolved` is true resolving <xref uid=\"com.azure.core.http.ProxyOptions.getAddress()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#getAddress()\"></xref> may be required before using the address in network calls.\n\nEnvironment configurations are loaded in this order:\n\n1. Azure HTTPS\n2. Azure HTTP\n3. Java HTTPS\n4. Java HTTP\n\nAzure proxy configurations will be preferred over Java proxy configurations as they are more closely scoped to the purpose of the SDK. Additionally, more secure protocols, HTTPS vs HTTP, will be preferred.\n\n`null` will be returned if no proxy was found in the environment."
returns:
description: "A <xref uid=\"com.azure.core.http.ProxyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ProxyOptions\"></xref> reflecting a proxy loaded from the environment, if no proxy is found <code>null</code>\n will be returned."
type: "<xref href=\"com.azure.core.http.ProxyOptions?alt=com.azure.core.http.ProxyOptions&text=ProxyOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.core.http.ProxyOptions.getAddress()"
fullName: "com.azure.core.http.ProxyOptions.getAddress()"
name: "getAddress()"
nameWithType: "ProxyOptions.getAddress()"
summary: "Gets the address of the proxy."
syntax: "public InetSocketAddress getAddress()"
desc: "Gets the address of the proxy."
returns:
description: "the address of the proxy."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/net/InetSocketAddress.html\">InetSocketAddress</a>"
- uid: "com.azure.core.http.ProxyOptions.getNonProxyHosts()"
fullName: "com.azure.core.http.ProxyOptions.getNonProxyHosts()"
name: "getNonProxyHosts()"
nameWithType: "ProxyOptions.getNonProxyHosts()"
summary: "Gets the host that bypass the proxy."
syntax: "public String getNonProxyHosts()"
desc: "Gets the host that bypass the proxy."
returns:
description: "the hosts that bypass the proxy."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.core.http.ProxyOptions.getPassword()"
fullName: "com.azure.core.http.ProxyOptions.getPassword()"
name: "getPassword()"
nameWithType: "ProxyOptions.getPassword()"
summary: "Gets the proxy password."
syntax: "public String getPassword()"
desc: "Gets the proxy password."
returns:
description: "the proxy password."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.core.http.ProxyOptions.getType()"
fullName: "com.azure.core.http.ProxyOptions.getType()"
name: "getType()"
nameWithType: "ProxyOptions.getType()"
summary: "Gets the type of the proxy."
syntax: "public ProxyOptions.Type getType()"
desc: "Gets the type of the proxy."
returns:
description: "the type of the proxy."
type: "<xref href=\"com.azure.core.http.ProxyOptions.Type?alt=com.azure.core.http.ProxyOptions.Type&text=Type\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.core.http.ProxyOptions.getUsername()"
fullName: "com.azure.core.http.ProxyOptions.getUsername()"
name: "getUsername()"
nameWithType: "ProxyOptions.getUsername()"
summary: "Gets the proxy username."
syntax: "public String getUsername()"
desc: "Gets the proxy username."
returns:
description: "the proxy username."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.core.http.ProxyOptions.setCredentials(java.lang.String,java.lang.String)"
fullName: "com.azure.core.http.ProxyOptions.setCredentials(String username, String password)"
name: "setCredentials(String username, String password)"
nameWithType: "ProxyOptions.setCredentials(String username, String password)"
summary: "Set the proxy credentials."
parameters:
- description: "proxy user name"
name: "username"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "proxy password"
name: "password"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ProxyOptions setCredentials(String username, String password)"
desc: "Set the proxy credentials."
returns:
description: "the updated ProxyOptions object"
type: "<xref href=\"com.azure.core.http.ProxyOptions?alt=com.azure.core.http.ProxyOptions&text=ProxyOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.core.http.ProxyOptions.setNonProxyHosts(java.lang.String)"
fullName: "com.azure.core.http.ProxyOptions.setNonProxyHosts(String nonProxyHosts)"
name: "setNonProxyHosts(String nonProxyHosts)"
nameWithType: "ProxyOptions.setNonProxyHosts(String nonProxyHosts)"
summary: "Sets the hosts which bypass the proxy."
parameters:
- description: "Hosts that bypass the proxy."
name: "nonProxyHosts"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ProxyOptions setNonProxyHosts(String nonProxyHosts)"
desc: "Sets the hosts which bypass the proxy.\n\nThe expected format of the passed string is a `'|'` delimited list of hosts which should bypass the proxy. Individual host strings may contain regex characters such as `'*'`."
returns:
description: "the updated ProxyOptions object"
type: "<xref href=\"com.azure.core.http.ProxyOptions?alt=com.azure.core.http.ProxyOptions&text=ProxyOptions\" data-throw-if-not-resolved=\"False\" />"
type: "class"
desc: "Represents the proxy configuration to be used in HTTP clients.\n\nThis class encapsulates the proxy settings, including the proxy type, address, and optional credentials. It provides methods to set and get these properties.\n\nThis class is useful when you want to configure a proxy for an HTTP client. For example, you can use it to create a proxy with specific credentials, or to specify hosts that should bypass the proxy.\n\nNote: This class provides a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Type\"></xref> enum to represent the proxy type, which can be HTTP, SOCKS4, or SOCKS5."
metadata: {}
package: "com.azure.core.http"
artifact: com.azure:azure-core:1.52.0